Skip to main content
Module 2 · Line Tracking

Lesson 3 · Bounce Driving — Knowledge ChecksAnswer key

Correct answers are marked and the explanation follows each question.

  1. When an if/else runs, how many of the two blocks execute?

    1. A.Both, top to bottom
    2. B.Exactly one — whichever matches the condition
    3. C.Neither, unless you call them
    4. D.It depends on the sensor

    An if/else always runs exactly one branch: the if-block when the condition is True, the else-block when it's False.

  2. What does `while True:` do?

    1. A.Runs the loop once
    2. B.Loops forever, until the robot is powered off or stopped
    3. C.Causes a syntax error
    4. D.Runs the loop only if a sensor is True

    The condition True is always true, so the loop repeats endlessly — the standard pattern for continuous robot control.

  3. left is 0.2 and right is 0.9 (threshold 0.5). Is `left > threshold or right > threshold` True?

    1. A.False — the left sensor is on white
    2. B.True — the right sensor is over the line, and or needs only one side
    3. C.False — you need both sensors on the line
    4. D.It causes an error

    or is true when at least one side is true. Right (0.9 > 0.5) is true, so the whole condition is true — bounce.