RoboBlocky
Sign In
Learning Math/CS/Engineering Design with Robotics
Grid Size: S M L Simple View: MinView:

Once we define a function, we can use it within other functions that we create. For example, it would be nice to have a "drawRectangle" function. To create one, take the code that draws a rectangle (as shown), which includes the traceOn, driveDistance, "right", and traceOff commands, and move it into a new function named drawRectangle using the pre-placed function block. Then add code that calls the drawRectangle function at the beginning of the program (after traceColor). Note that the function definition for "right" is pre-placed at the end for you.

Piano
Workspace Load Save Ch Ch Shell Console
Lock
roboblockyA833.ch
Time