Skip to main content
Module 1 · Learning to Drive

Lesson 3 · Introduction to Functions — Knowledge ChecksAnswer key

Correct answers are marked and the explanation follows each question.

  1. What's the difference between defining a function and calling it?

    1. A.Defining runs the code; calling just names it
    2. B.Defining writes what it does; calling runs it in your program
    3. C.They are two words for the same thing
    4. D.You can only call a function once

    Defining is setup — it doesn't move the robot. The function only runs when you call it.

  2. Your program calls square (a 4-sided loop) four times. How many sides does the robot drive in total?

    1. A.4
    2. B.8
    3. C.16
    4. D.1

    Each call draws 4 sides, and you called it 4 times: 4 × 4 = 16.

  3. You want bigger squares everywhere in your program. With a square function, how many places do you change the size?

    1. A.One — just inside the function
    2. B.One for every time you called it
    3. C.You have to rewrite the function
    4. D.Two

    That's the payoff of a function: fix or change it in one place, and every call updates automatically.