Session 4, #2: Looping Through Lists
We can also loop through other values:
Here, our list is different colors. Each time through the loop, tortuga is set to the next color on the list, then moves forward and turns. tortuga keeps going until she has used up every color in the list.
- Add some more colors to the list. What happens? How many lines does it draw now?
- How many colors would you need to draw 10 lines in your picture?