Skip to main content
Module 4 · Manhattan Navigation

Lesson 7 · The Challenge of Turning — Knowledge ChecksAnswer key

Correct answers are marked and the explanation follows each question.

  1. The robot moves from (2,3) to (3,3). Which direction is that, and what heading number?

    1. A.North, heading 0
    2. B.South, heading 2
    3. C.East, heading 1
    4. D.West, heading 3

    The row went 2 → 3 (row +1). Increasing row means moving down the grid, which is South — heading 2.

  2. Going from (1,5) to (1,4), what does desired_heading return?

    1. A.0 (North)
    2. B.1 (East)
    3. C.2 (South)
    4. D.3 (West)

    The row is unchanged; the column went 5 → 4 (col −1). Decreasing column is West — heading 3.

  3. Starting at heading 0 (N) and wanting heading 3 (W), how many right turns does turn_to make?

    1. A.1
    2. B.2
    3. C.3
    4. D.0

    0 → 1 → 2 → 3: three right turns. Turning right (clockwise) from North all the way around to West is three steps — the loop just keeps going until it matches.

  4. Why must drive_path update self.position after each step?

    1. A.To make the robot faster
    2. B.So the next desired_heading() compares the next intersection against the correct current position
    3. C.To reset the heading to North
    4. D.It doesn't matter — position is never used again

    desired_heading works from the difference between current and next. If position isn't updated, every step after the first computes the wrong direction.