Skip to main content
Module 1 · Learning to Drive

Lesson 1-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 built your square function, but the call block that appeared is rounded and won't snap into your main program. What went wrong?

    1. A.You used the definition block with a return value instead of the plain one✓
    2. B.The function is empty, so there is nothing to call
    3. C.You have to press Run before the block will connect
    4. D.Function calls always go inside a Repeat block

    A function with a return value stands for a value, so its call block is rounded and only fits in a slot where a number belongs — it can't join the program stack. Rebuild the definition with the plain 'to do something' block.

  4. 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.