Skip to main content
Module 1 · Learning to Drive

Lesson 3 · Introduction to Functions — Knowledge Checks

Name Date
  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

    Answer Why?

  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

    Answer Why?

  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

    Answer Why?