Learning Math and Coding with Robots

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
Units: US Customary Metric
Background:

Robot 1

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

Robot 2

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

Robot 3

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

Robot 4

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 - Addition
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. 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("#990000");
    plot.ellipse(x, y, 2.9, 2.6, -15);
    plot.fillColor("red");
    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("blue");
    plot.ellipse(x, y, 2.9, 2.6, 15);
    plot.fillColor("#33ffff");
    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=33 Odd");
ornament(17, 16, 1);
delaySeconds(0.03);
printf("20+30=50 Even");
ornament(20, 30, 2);
delaySeconds(0.03);
printf("5+9=14 Odd");
ornament(6, 9, 2);
delaySeconds(0.03);
printf("29+12=41 Odd");
ornament(29, 12, 1);
delaySeconds(0.03);
printf("22+22= 48 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 (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. Refresh for more problems.

		
Time