for Learning Math and Coding
Piano
 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
 Labels: x-axis y-axis Show Grid Grid: 12x12 inches 24x24 inches 36x36 inches 72x72 inches 96x96 inches 192x192 inches Quad: 4 Quadrants 1 Quadrant 1&4 Quadrants Units: US Customary Metric
 Background:

Robot 1

0
S
M
L
 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

0
S
M
L
 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

0
S
M
L
 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

0
S
M
L
 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
Decorate Christmas Tree - Subtraction
```/* 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();```
 Load Blocks Symbol Symbol+Word Word Hardware LArduino Workspace Show Ch Save File
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.

Time