### 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: (4 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: (8 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: (12 in, 0 in) Current Angle: 90 deg Wheel Radius: 1.75 in1.625 in2.0 in Track Width: in

Easter Egg Hunt
Problem Statement:
There are Easter Eggs at various locations on the grid and you want to get as many as possible. One strategy: From the initial position (0,0), driving to the nearest egg, then from the new position, drive to the next nearest egg, etc. until you reach the last egg. Click solution for example. Refresh for more problems.
```/* Code generated by RoboBlockly v2.0 */
#include <chplot.h>
double trackwidth = 3.69;
CPlot plot;

// Describe this function...
void Sample_Set_Up_1() {
plot.fillColor("#009900");
plot.rectangle(-12, -12, 24, 24);
plot.strokeColor(randcolor());
plot.fillColor(randcolor());
plot.ellipse(9, 4, 1, 1.5, 0);
plot.strokeColor(randcolor());
plot.fillColor(randcolor());
plot.ellipse(9, -8, 1, 1.5, 0);
plot.strokeColor(randcolor());
plot.fillColor(randcolor());
plot.ellipse(-5, -4, 1, 1.5, 0);
plot.strokeColor(randcolor());
plot.fillColor(randcolor());
plot.ellipse(8, 6, 1, 1.5, 0);
plot.strokeColor(randcolor());
plot.fillColor(randcolor());
plot.ellipse(-2, 5, 1, 1.5, 0);
plot.strokeColor(randcolor());
plot.fillColor(randcolor());
plot.ellipse(-10, 6, 1, 1.5, 0);
plot.strokeColor(randcolor());
plot.fillColor(randcolor());
plot.ellipse(3, -6, 1, 1.5, 0);
plot.strokeColor(randcolor());
plot.fillColor(randcolor());
plot.ellipse(-10, -2, 1, 1.5, 0);
}

Sample_Set_Up_1();
robot.traceColor("#00FFFF", 4);

plot.axisRange(PLOT_AXIS_XY, -12, 12);
plot.ticsRange(PLOT_AXIS_XY, 2);
plot.sizeRatio(1);
plot.plotting();```
```/* Code generated by RoboBlockly v2.0 */
#include <chplot.h>
double trackwidth = 3.69;
CPlot plot;

// Describe this function...
void Sample_Set_Up_2() {
plot.fillColor("#009900");
plot.rectangle(-12, -12, 24, 24);
plot.strokeColor(randcolor());
plot.fillColor(randcolor());
plot.ellipse(8, -2, 1, 1.5, 0);
plot.strokeColor("white");
plot.text("(8,-2)", PLOT_TEXT_LEFT, 6.5, -1);
plot.strokeColor(randcolor());
plot.fillColor(randcolor());
plot.ellipse(0, 9, 1, 1.5, 0);
plot.strokeColor("white");
plot.text("(0,9)", PLOT_TEXT_LEFT, -1.5, 10);
plot.strokeColor(randcolor());
plot.fillColor(randcolor());
plot.ellipse(4, 4, 1, 1.5, 0);
plot.strokeColor("white");
plot.text("(4,4)", PLOT_TEXT_LEFT, 2.5, 5);
plot.strokeColor(randcolor());
plot.fillColor(randcolor());
plot.ellipse(3, -11, 1, 1.5, 0);
plot.strokeColor("white");
plot.text("(3,-11)", PLOT_TEXT_LEFT, -2, -11.5);
plot.strokeColor(randcolor());
plot.fillColor(randcolor());
plot.ellipse(3, -9, 1, 1.5, 0);
plot.strokeColor("white");
plot.text("(3,-9)", PLOT_TEXT_LEFT, 1.5, -8);
plot.strokeColor(randcolor());
plot.fillColor(randcolor());
plot.ellipse(7, -11, 1, 1.5, 0);
plot.strokeColor("white");
plot.text("(7,-11)", PLOT_TEXT_LEFT, 5.5, -10);
plot.strokeColor(randcolor());
plot.fillColor(randcolor());
plot.ellipse(-5, 8, 1, 1.5, 0);
plot.strokeColor("white");
plot.text("(-5,8)", PLOT_TEXT_LEFT, -6.5, 9);
plot.strokeColor(randcolor());
plot.fillColor(randcolor());
plot.ellipse(-5, -9, 1, 1.5, 0);
plot.strokeColor("white");
plot.text("(-5,-9)", PLOT_TEXT_LEFT, -6.5, -8);
}

Sample_Set_Up_2();
robot.traceColor("#00FFFF", 4);