Lesson 9 · Module 4 Final Project — Knowledge ChecksAnswer key
Why is the line manhattan.position = navigator.position necessary each leg?
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.
At the start of leg 2, what is the Navigator's heading?
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.
On the second leg the robot drives a clearly wrong path. What's the first thing to check?
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.
You want the robot to end where it began. What's the simplest change?
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.