Skip to main content
Module 1 · Learning to Drive

Lesson 8 · Hello, Python — Knowledge ChecksAnswer key

Correct answers are marked and the explanation follows each question.

  1. Which line is written correctly?

    1. A.Print("Driving...")
    2. B.print "Driving..."
    3. C.print("Driving...")
    4. D.print(Driving...)

    Lowercase print, parentheses around the call, and quotes around the text. The others break one rule each.

  2. What's wrong with this line? for i in range(4)

    1. A.range should be capitalized
    2. B.It is missing the colon at the end — for i in range(4):
    3. C.It needs quotes around the 4
    4. D.Nothing is wrong

    Lines that start a block (for, if, def) must end with a colon.

  3. Why does drivetrain.straight(-30) drive the robot backward?

    1. A.Negative numbers reverse the direction — same as a negative cm in the Straight block
    2. B.It drives forward 30 cm, then stops
    3. C.It turns instead of driving
    4. D.It causes an error

    A negative distance means backward, exactly like typing a negative cm value into the block.

  4. Find the bug in the code above.

    1. A.straight should be capitalized
    2. B.Print should be lowercase: print
    3. C.The distances should be positive
    4. D.There is no bug

    Python is case-sensitive. Print with a capital P isn't the same as the built-in print.