Random & Repetition: Good Clean Fun
Last updated
Last updated
So far all the code you have written has been sequential, one line of code for each action. But sometimes we want the computer to repeat an action and for that we will use a for loop
How many dots will this program draw? Now change the program to make 50 dots
Each time, the program is selecting a random number between 1 and 91 as the angle of the right turn
Now modify your program so that it picks a random color each time.Make sure to include this code BEFORE you tell the computer to draw the dot.
TIP: Spaces matter here
In Network Notebook: explain in english the steps that the computer is taking for each line.
Now modify the code so that the lines can be longer and modify the angle so that your drawing is based on a pentagon