Computer Science I / Functions and Parameter Passing
Practice question · Sort into groups

For def scale(factor): return factor * 10, later called as scale(60), sort each item by what it is.

Groups: Parameter · Argument · Return value

Hints
  1. A parameter is a name in the definition; an argument is an actual value in the call.
  2. The value handed back by return is neither of those two.
Show the answer

Parameter: factor, named in the definition

Argument: 60, supplied in the call

Return value: 600, handed back to the caller

Why

factor is the parameter (a name in the definition), 60 is the argument (the actual value passed), and 600 = 60 * 10 is the return value. Confusing parameters with arguments is the pitfall named in this lesson: the definition declares names, the call supplies values.

Read the lesson: Functions and Parameter Passing →

Practise Functions and Parameter Passing

The app has 5 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Functions and Parameter Passing