Skip to main content
Module 4 · Manhattan Navigation

Lesson 4-4 · The Driver — Knowledge Checks

Name Date
  1. What does this print?

    path = [(1, 0), (2, 0), (2, 1)]
    last = path[2]
    print(last[1])
    1. A.(2, 0)
    2. B.1
    3. C.2
    4. D.An IndexError

    Answer Why?

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

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

    Answer Why?

  3. Going from (1, 3) to (1, 2), what does get_desired_heading() return?

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

    Answer Why?