Skip to main content
Module 2 · Line Tracking

Lesson 2 · Drive to the Edge and Stop — Knowledge Checks

Name Date
  1. Which loop fits the task 'drive until the robot detects a line'?

    1. A.A for loop — you know it takes exactly 4 steps
    2. B.A while loop — you repeat until a condition changes, however long that takes
    3. C.Neither — you cannot loop with sensors
    4. D.Both work exactly the same here

    Answer Why?

  2. A student's robot drives forward and never stops, even over the line. What did they most likely forget?

    1. A.The board.wait_for_button() line
    2. B.To re-read the sensor inside the loop, so the condition never changes
    3. C.To import the drivetrain
    4. D.To charge the battery

    Answer Why?

  3. The threshold is 0.5 and the sensor reads 0.3. Is `left < threshold` True or False?

    1. A.True — 0.3 is less than 0.5
    2. B.False — 0.3 is greater than 0.5
    3. C.True — they are equal
    4. D.It causes an error

    Answer Why?