Lesson 1-3 · Introduction to Functions — Knowledge ChecksAnswer key
What's the difference between defining a function and calling it?
Defining is setup — it doesn't move the robot. The function only runs when you call it.
Your program calls square (a 4-sided loop) four times. How many sides does the robot drive in total?
Each call draws 4 sides, and you called it 4 times: 4 × 4 = 16.
You built your square function, but the call block that appeared is rounded and won't snap into your main program. What went wrong?
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.
You want bigger squares everywhere in your program. With a square function, how many places do you change the size?
That's the payoff of a function: fix or change it in one place, and every call updates automatically.