Module 2 · Line Tracking
Lesson 4 · Random Turns — Knowledge ChecksAnswer key
What can `random.randint(1, 6)` return?
randint gives one integer, and the range is inclusive — so 1, 2, 3, 4, 5, or 6 (like rolling a die).
Where do import statements belong?
By convention imports go at the top. You import once; the tools are then available everywhere below.
Why does always turning exactly 180° cause a problem?
A 180° turn sends the robot straight back the way it came, so it bounces between the same two points forever. Random angles break that.