Skip to main content
Module 2 · Line Tracking

Lesson 2-8 · Detecting Intersections — Knowledge Checks

Name Date
  1. Why test is_at_cross() with a straight drive before using it in the line follower?

    1. A.Because line following cannot be tested on a cross
    2. B.So that if the test fails, the only thing that can be wrong is the cross check — the following code is not even in the program yet
    3. C.Because set_effort() is faster than arcade()
    4. D.It makes no difference; either order is the same

    Answer Why?

  2. What makes track_to_intersection() stop?

    1. A.A fixed number of loop passes
    2. B.is_at_cross() becoming True — both sensors see the cross
    3. C.The error reaching exactly zero
    4. D.A timer

    Answer Why?

  3. In track_to_intersection(), where is the intersection detected?

    1. A.In an if/else inside the loop body
    2. B.In the while condition — the body only steers
    3. C.After the loop, by checking the last error
    4. D.In arcade()

    Answer Why?

  4. Why does track_to_intersection() end by driving 8.75 cm rather than driving for half a second?

    1. A.straight() is easier to spell
    2. B.A distance is the same with a full or flat battery and on any floor; a time would have to be re-tuned constantly
    3. C.time.sleep() cannot be used with motors
    4. D.Because 8.75 is a magic number

    Answer Why?