### 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

Show the Basics of Probablity
Problem Statement:
The pre-placed blocks will ask you how many points you want to animate, will randomly place them, then tell you how many are in the black area. Play around with the program to learn more about the probability of random events. What is the chance any given point will be in the black area? If you know this, estimate how many points will be in the black area if you input 100 points. How about 300 points?
```/* Code generated by RoboBlockly v2.0 */
#include <chplot.h>
double numPoints;
double count;
double x;
double y;
int count2;
CPlot plot;

printf("How many points do you want to show?"+"\n");
scanf("%lf", &numPoints);
count = 0;
count2 = 0;
while(count2 < numPoints) {
x = randint(0, 36);
y = randint(0, 36);
count2 = count2 + 1;
}
delaySeconds(0.3);
printf("There were %g points in the black area!\n", count);
if (x <= 12) {
count = count + 1;
}
plot.point(x, y);
delaySeconds(0.01);

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:
The pre-placed blocks will ask you how many points you want to animate, will randomly place them, then tell you how many are in the black area. Play around with the program to learn more about the probability of random events. What is the chance any given point will be in the black area? If you know this, estimate how many points will be in the black area if you input 100 points. How about 300 points?

Time