Skip to main content
Module 4 · Manhattan Navigation

Lesson 3 · Lists — Knowledge ChecksAnswer key

Correct answers are marked and the explanation follows each question.

  1. Which is true about lists compared to tuples?

    1. A.Lists use () and cannot change
    2. B.Lists use [] and CAN change (they are mutable)
    3. C.Lists and tuples are identical
    4. D.Lists can only hold numbers

    Lists use square brackets and are mutable, so they can grow — perfect for a path that's built up step by step.

  2. Given path = [(0, 0), (1, 0), (2, 0)], what does path[2] return?

    1. A.(1, 0)
    2. B.(2, 0)
    3. C.2
    4. D.An IndexError

    Indexing starts at 0, so path[2] is the third item: the tuple (2, 0).

  3. For that same path, what does path[2][1] return?

    1. A.2
    2. B.0
    3. C.(2, 0)
    4. D.An error

    path[2] is (2, 0); then [1] takes its column — 0. Two indexes: which step, then which part of that step.

  4. A student's loop ends with a list holding only the LAST coordinate instead of all of them. What's wrong?

    1. A.append() is broken
    2. B.The append() line is outside the loop (wrong indentation), so it runs only once
    3. C.They used a tuple instead of a list
    4. D.range() is the wrong size

    If append() isn't indented inside the loop, it runs a single time after the loop ends — capturing just the final value.