Learning Math and Coding with Robots

Linkbot Image Mindstorm Image Cursor Image
0x36302418126y36302418126
Grid:
Tics Lines:
Width px
Hash Lines:
Width px
Labels:
Font px
Trace Lines:
Robot 1:
Width px
Robot 2:
Width px
Robot 3:
Width px
Robot 4:
Width px
Axes: x-axis y-axis Show Grid
Grid: 24x24 inches 36x36 inches 72x72 inches
96x96 inches 192x192 inches
Quad: 4 quadrants 1 quadrant Hardware
Units: US Customary Metric
Background: Background Image

Robot 1

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (0 in, 0 in)
Current Angle: 90 deg
Wheel Radius:
Track Width:
in

Robot 2

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (6 in, 0 in)
Current Angle: 90 deg
Wheel Radius:
Track Width:
in

Robot 3

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (12 in, 0 in)
Current Angle: 90 deg
Wheel Radius:
Track Width:
in

Robot 4

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (18 in, 0 in)
Current Angle: 90 deg
Wheel Radius:
Track Width:
in

Decorate Christmas Tree - Subtraction
Problem Statement:
Click "Run" to run the code and answer the prompt. Every time you get the answer correct, an ornament will pop up on the tree (purple one if your answer is even and yellow if your answer is odd). You should have 5 ornaments at the end of the program. Refresh for more problems.
/* Code generated by RoboBlockly v2.0 */
/* Problem Statement: 
    Click "Run" to run the code and answer the prompt. Every
    time you get the answer correct, an ornament will pop up on
    the tree (blue one if your answer is even and red if your
    answer is odd). You should have 5 ornaments at the end of
    the program.  */
#include <chplot.h>
CPlot plot;

// Describe this function...
void ornament(double x, double y, double oe) {
  if (oe == 1) {
    plot.noStrokeColor();
    plot.fillColor("#ff6600");
    plot.ellipse(x, y, 2.9, 2.6, -15);
    plot.fillColor("#ffff33");
    plot.circle(x, y, 1.2);
    plot.strokeWidth(3);
    plot.strokeColor("#cccccc");
    plot.line(x, y + 0.5, x, y + 1.7);
  }
  else {
    plot.noStrokeColor();
    plot.fillColor("#6600cc");
    plot.ellipse(x, y, 2.9, 2.6, 15);
    plot.fillColor("#9999ff");
    plot.circle(x, y, 1.2);
    plot.strokeWidth(3);
    plot.strokeColor("#cccccc");
    plot.line(x, y + 0.5, x, y + 1.7);
  }
}

// This is a sample solution:
printf("17-16=1 Odd");
ornament(17, 16, 1);
delaySeconds(0.03);
printf("30-20=10 Even");
ornament(20, 30, 2);
delaySeconds(0.03);
printf("9-6=3 ODD");
ornament(10, 12, 1);
delaySeconds(0.03);
printf("29-12=17 Odd");
ornament(29, 12, 1);
delaySeconds(0.03);
printf("22-22= 0 Even");
ornament(22, 22, 2);
plot.grid(PLOT_OFF);

plot.axisRange(PLOT_AXIS_XY, 0, 36);
plot.ticsRange(PLOT_AXIS_XY, 6);
plot.sizeRatio(1);
plot.plotting();
Blocks Save Blocks Load Blocks Show Ch Save Ch Workspace
Problem Statement:
Click "Run" to run the code and answer the prompt. Every time you get the answer correct, an ornament will pop up on the tree (purple one if your answer is even and yellow if your answer is odd). You should have 5 ornaments at the end of the program. Refresh for more problems.

		
Rubbish bin
Time