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

 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
Draw a Pie Chart with Percentages
```/* Code generated by RoboBlockly v2.0 */
#include <chplot.h>
double v1;
double v2;
double v3;
double v4;
double v5;
double total;
double start;
double end;
double i;
double per1;
double per2;
double per3;
double per4;
double per5;
CPlot plot;

v1 = 5;
v2 = 6;
v3 = 7;
v4 = 8;
v5 = 9;
total = ((v1 + v2) + v3) + (v5 + v4);
start = 0;
end = (double(v1)/total) * 360;
plot.noStrokeColor();
for(i = 1; i <= 5; i++) {
plot.fillColor(randcolor());
plot.arcSector(18, 18, 10, start, end);
if (i == 1) {
start = end;
end = start + (double(v2)/total) * 360;
}
else if (i == 2) {
start = end;
end = start + (double(v3)/total) * 360;
}
else if (i == 3) {
start = end;
end = start + (double(v4)/total) * 360;
}
else if (i == 4) {
start = end;
end = start + (double(v5)/total) * 360;
}
else {
start = end;
end = 0;
}
}
plot.strokeColor("black");
plot.strokeWidth(2);
// set the %.#lf in printf() for 0 digits after the decimal point for double type
per1 = (double(v1)/35) * 100;
per2 = (double(v2)/35) * 100;
per3 = (double(v3)/35) * 100;
per4 = (double(v4)/35) * 100;
per5 = (double(v5)/35) * 100;
plot.text(string_t(per1) + "%", PLOT_TEXT_LEFT, 22, 20);
plot.text(string_t(per2) + "%", PLOT_TEXT_LEFT, 17, 23);
plot.text(string_t(per3) + "%", PLOT_TEXT_LEFT, 10, 20);
plot.text(string_t(per4) + "%", PLOT_TEXT_LEFT, 11, 13);
plot.text(string_t(per5) + "%", PLOT_TEXT_LEFT, 20, 13);
plot.text("1 star", PLOT_TEXT_LEFT, 30, 26);
plot.text("2 stars", PLOT_TEXT_LEFT, 17, 32);
plot.text("3 stars", PLOT_TEXT_LEFT, 2, 26);
plot.text("4 stars", PLOT_TEXT_LEFT, 5, 4);
plot.text("5 stars", PLOT_TEXT_LEFT, 25, 4);
plot.line(29, 25, 26, 22);
plot.line(19, 30, 19, 25);
plot.line(5, 25, 10, 22);
plot.line(7, 6, 12, 12);
plot.line(25, 6, 23, 12);
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:
The pre-placed blocks draw a pie chart of equal thirds. Using the arc sector block, create a pie chart that represents the reviews for a movie reviewed by several people. 5 people gave it 1 star, 6 gave it 2 stars, 7 gave it 3 stars, 8 gave it 4 stars, and 9 people gave it 5 stars. Label the pie chart with percentages.

Time