Skip to main content
Module 4 · Manhattan Navigation

Lesson 9 · Module 4 Final Project — Knowledge ChecksAnswer key

Correct answers are marked and the explanation follows each question.

  1. Why is the line manhattan.position = navigator.position necessary each leg?

    1. A.It resets the robot to (0,0)
    2. B.So the next compute_path() starts from where the robot actually is now, not the original start
    3. C.It updates the heading
    4. D.It is not necessary

    Manhattan doesn't automatically know the robot moved. Without updating its position, every leg after the first would compute a path from (0,0) — the wrong starting point.

  2. At the start of leg 2, what is the Navigator's heading?

    1. A.Always reset to 0 (North)
    2. B.Whatever heading it ended leg 1 with
    3. C.Always 2 (South)
    4. D.Random

    The Navigator keeps its state. It begins each leg facing however it finished the last — which is exactly why turn_to() must work from the real current heading.

  3. On the second leg the robot drives a clearly wrong path. What's the first thing to check?

    1. A.The battery voltage
    2. B.Whether manhattan.position was updated after leg 1
    3. C.The color of the grid lines
    4. D.The HEADING_NAMES list

    A wrong path on leg 2+ almost always means the position update was skipped, so compute_path started from (0,0) instead of where the robot really is. Check that line first.

  4. You want the robot to end where it began. What's the simplest change?

    1. A.Create a new Navigator facing North at the end
    2. B.Add (0, 0) as the final destination in the list
    3. C.Reverse the LineTrack motors
    4. D.Restart the program

    The loop already computes and drives a path to each destination. Just append home (0,0) to the list and the last leg drives the robot back.