Skip to main content
Module 4 · Manhattan Navigation

Lesson 6 · Testing Without a Robot — Knowledge Checks

Name Date
  1. What does 'separation of concerns' let you do here?

    1. A.Run the robot faster
    2. B.Test the path-planning math on its own, separately from the driving
    3. C.Skip testing entirely
    4. D.Combine Manhattan and Navigator into one class

    Answer Why?

  2. Where should the 'expected' path come from?

    1. A.Whatever the code prints when you run it
    2. B.Hand-calculated by you, before running the code
    3. C.A random guess
    4. D.The robot's actual movement

    Answer Why?

  3. Your test shows actual = [(1,0),(2,0),(2,1)] but expected = [(1,0),(2,0),(2,1),(2,2),(2,3)]. What's the likely problem?

    1. A.The robot battery is low
    2. B.The east (column) loop is stopping early or not running fully — the column moves are missing
    3. C.The test is wrong
    4. D.Nothing — that output is fine

    Answer Why?

  4. After using print statements to fix a bug, what should you do with them?

    1. A.Leave them in — more output is always better
    2. B.Remove or comment them out so the test output stays clean
    3. C.Move them outside the class
    4. D.Turn them into knowledge checks

    Answer Why?