Learning Math and CS with Robotics
Sign In

CSP Unit 3 Lesson 8.15

Piano
Linkbot Image Mindstorm Image
Grid Size: S M L Simple View: MinView:
CSP Unit 3 Lesson 8.15

Using your code from Lesson 8.14a (or 8.14b), use the random integer code stub in the function calls to drawFish in order to specify random values for the x and y location of the fish. Note that the grid for the underwater scene has dimensions of 36x36, i.e., the values of x and y can run from 0 to 36. So make sure to change the random integer code stub so that the it runs from 0 to 36 (or, even better, from 6 to 30, so that the drawn fish don't get cut off at the edges). Run and Reset the program multiple times to see the variety of results. Don't forget to save your work to the cloud in an xml file named "YourName_Lesson8.15"!

Load Blocks
Hardware
LArduino
Workspace Save File Show Ch Edit Ch Console

		
Rubbish bin
Time