Skip to main content
Module 2 · Line Tracking

Lesson 4 · Random Turns — Knowledge Checks

Name Date
  1. What can `random.randint(1, 6)` return?

    1. A.Any decimal between 1 and 6
    2. B.Any whole number from 1 to 6, including 1 and 6
    3. C.The numbers 1 through 5 only
    4. D.Exactly six random numbers at once

    Answer Why?

  2. Where do import statements belong?

    1. A.At the very top of the file
    2. B.Inside the while loop, so they run every pass
    3. C.Right before the robot moves
    4. D.Anywhere — it makes no difference

    Answer Why?

  3. Why does always turning exactly 180° cause a problem?

    1. A.It drains the battery faster
    2. B.The robot retraces the same path back and forth and never explores the rest
    3. C.180° turns are inaccurate on hardware
    4. D.It makes the robot leave the circle

    Answer Why?