Module 1 · Learning to Drive
Lesson 9 · Python Loops — Knowledge Checks
Name Date
What numbers does range(4) produce?
Answer Why?
In the code above, how many times does print("Square complete!") run?
Answer Why?
You want a loop to run 6 times to draw a hexagon. What goes in the range?
Answer Why?
In the nested program above, how many times does drivetrain.straight() run in total?
Answer Why?
What happens if you indent the size line twice, so it lines up with the drivetrain lines?
Answer Why?