### Learning Math and Coding with Robots

 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:

#### Robot 1

 Initial Position: ( in, in) Initial Angle: deg Current Position: (0 in, 0 in) Current Angle: 90 deg Wheel Radius: 1.75 in1.625 in2.0 in Track Width: in

#### Robot 2

 Initial Position: ( in, in) Initial Angle: deg Current Position: (6 in, 0 in) Current Angle: 90 deg Wheel Radius: 1.75 in1.625 in2.0 in Track Width: in

#### Robot 3

 Initial Position: ( in, in) Initial Angle: deg Current Position: (12 in, 0 in) Current Angle: 90 deg Wheel Radius: 1.75 in1.625 in2.0 in Track Width: in

#### Robot 4

 Initial Position: ( in, in) Initial Angle: deg Current Position: (18 in, 0 in) Current Angle: 90 deg Wheel Radius: 1.75 in1.625 in2.0 in Track Width: in

Super Mario Jump
Problem Statement:
The pre-placed blocks move Mario under the block and move the star out of the block. Animate Mario to jump and touch the block to cause the yellow star to come out and land on him.
```/* Code generated by RoboBlockly v2.0 */
#include <chplot.h>
double jump;
double i;
double j;
double k;
double m;
double n;
CPlot plot;

jump = 4;
plot.strokeColor("black");
for(i = 0; i <= 12; i++) {
//plot.backgroundImage("floor.png");
plot.fillColor("#663333");
plot.rectangle(11, 9, 3, 3);
plot.strokeColor("black");
plot.fillColor("red");
plot.circle(i + 0.75, 1.5, 1.5);
plot.fillColor("#cc9933");
plot.circle(i + 0.75, 4, 1);
delaySeconds(0.025);
}
double j_inc = 1;
if (0 > jump) {
j_inc = -j_inc;
}
j = 0;
while(j_inc >= 0 ? j <= jump : j >= jump) {
//plot.backgroundImage("floor.png");
plot.fillColor("#663333");
plot.rectangle(11, 9, 3, 3);
plot.fillColor("red");
plot.circle(12.75, j + 1.5, 1.5);
plot.fillColor("#cc9933");
plot.circle(12.75, j + 4, 1);
delaySeconds(0.015);
j += j_inc;
}
double k_inc = 1;
if (0 > jump) {
k_inc = -k_inc;
}
k = 0;
while(k_inc >= 0 ? k <= jump : k >= jump) {
//plot.backgroundImage("floor.png");
plot.fillColor("yellow");
plot.star(12.5, k * 2 + 10.5, 3, 0);
plot.fillColor("#330000");
plot.rectangle(11, 9, 3, 3);
plot.fillColor("red");
plot.circle(12.75, (jump + 1.5) - k, 1.5);
plot.fillColor("#cc9933");
plot.circle(12.75, (jump + 4) - k, 1);
delaySeconds(0.015);
k += k_inc;
}
for(m = 1; m <= 14; m++) {
//plot.backgroundImage("floor.png");
plot.fillColor("yellow");
plot.star(12.5, 18.5 - m, 3, 0);
plot.fillColor("#330000");
plot.rectangle(11, 9, 3, 3);
plot.fillColor("red");
plot.circle(12.75, 1.5, 1.5);
plot.fillColor("#cc9933");
plot.circle(12.75, 4, 1);
delaySeconds(0.015);
}
for(n = 0; n <= 10; n++) {
//plot.backgroundImage("floor.png");
plot.fillColor("#330000");
plot.rectangle(11, 9, 3, 3);
plot.fillColor(randcolor());
plot.circle(n + 12.75, 1.5, 1.5);
plot.fillColor("#cc9933");
plot.circle(n + 12.75, 4, 1);
delaySeconds(0.025);
}

plot.label(PLOT_AXIS_XY, "");
plot.grid(PLOT_OFF);
plot.tics(PLOT_AXIS_XY, PLOT_OFF);
plot.axis(PLOT_AXIS_XY, PLOT_OFF);
plot.axisRange(PLOT_AXIS_XY, 0, 24);
plot.ticsRange(PLOT_AXIS_XY, 2);
plot.sizeRatio(1);
plot.plotting();```
 Blocks Save Blocks Load Blocks Show Ch Save Ch Workspace
Problem Statement:
The pre-placed blocks move Mario under the block and move the star out of the block. Animate Mario to jump and touch the block to cause the yellow star to come out and land on him.

Time