Barobo
PortalSign In
HomeShopTutorialsFree CurriculumHour of Code
RoboBlockly for Learning Math and Coding

Piano
Linkbot Image Mindstorm Image Cursor Image
0x36302418126y36302418126
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: Background Image

Robot 1

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (26 in, 29 in)
Current Angle: 225 deg
Wheel Radius:
Track Width:
in

Robot 2

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (0 in, 6 in)
Current Angle: 0 deg
Wheel Radius:
Track Width:
in

Robot 3

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (0 in, 12 in)
Current Angle: 0 deg
Wheel Radius:
Track Width:
in

Robot 4

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (0 in, 18 in)
Current Angle: 0 deg
Wheel Radius:
Track Width:
in
Delivering Presents
/* Code generated by RoboBlockly v2.0 */
#include <linkbot.h>
#include <chplot.h>
double house_number;
CLinkbotI robot;
double radius = 1.75;
CPlot plot;
double trackwidth = 3.69;

// Describe this function...
void present() {
  plot.fillColor("red");
  plot.strokeWidth(3);
  plot.strokeColor("#c0c0c0");
  plot.rectangle(house_number - 1, 2, 3, 3);
  plot.quad(house_number - 1, 5, house_number + 2, 5, house_number + 3, 6, house_number, 6);
  plot.quad(house_number + 2, 2, house_number + 2, 5, house_number + 3, 6, house_number + 3, 3);
  plot.strokeColor("white");
  plot.line(house_number + 0.5, 2, house_number + 0.5, 5);
  plot.line(house_number + 2.5, 2.5, house_number + 2.5, 5.5);
  plot.line(house_number + 0.5, 5, house_number + 1, 5.5);
  plot.noFill();
  plot.ellipse(house_number, 6, 2, 1, -30);
  plot.ellipse(house_number + 2, 6, 2, 1, -150);
  plot.strokeWidth(1);
  plot.point(house_number + 1, 5.5);
}

printf("Which house is missing its present?"+"\n");
scanf("%lf", &house_number);
robot.traceOff();
robot.setSpeed(10, radius);
plot.strokeWidth(3);
plot.strokeColor("red");
plot.text("21", PLOT_TEXT_LEFT, 10, 33);
robot.drivexyTo(house_number, 0, radius, trackwidth);
present();

plot.axisRange(PLOT_AXIS_XY, 0, 36);
plot.ticsRange(PLOT_AXIS_XY, 6);
plot.sizeRatio(1);
plot.plotting();
Load Blocks
Hardware
LArduino
Workspace Show Ch Save File
Problem Statement:

The elves accidentally left off some houses on Santa's list. The list is given on the grid. Solve for the missing house number. Then, run the code to answer the prompt question and help Santa deliver the present to that missing house. Click New Problem for new problems.


		
Rubbish bin
Time