Why can't the robot use a straight diagonal to shorten the trip?
- A.Diagonals are slower than straight lines
- B.The robot follows grid lines, so it can only move along rows and columns
- C.The grid is too small
- D.It can — the Manhattan algorithm just chooses not to
Answer Why?
Hand-tracing (2,0) → (2,3), what path do you get?
- A.[(2,0), (2,1), (2,2), (2,3)]
- B.[(2,1), (2,2), (2,3)]
- C.[(2,3)]
- D.[]
Answer Why?
Why does the stage-1 function return [] for (3,3) → (1,0)?
- A.append() is broken
- B.Both while conditions are False from the start (3 is not < 1, 3 is not < 0), so neither loop runs
- C.The start and end are the same
- D.It runs forever
Answer Why?
For a trip that goes up and to the right, how many of the four while loops actually run?
- A.All four
- B.Two — the north loop and the east loop
- C.Just one
- D.None — it needs if/else
Answer Why?
What does compute_path((2, 2), (2, 2)) return, and why?
- A.[(2, 2)] — the current position
- B.[] — all four loop conditions are False, so nothing is appended
- C.An error
- D.0
Answer Why?