35 minutes. Instant-marked. Unlimited attempts. Each answer is marked as soon as you choose it, with an explanation. Nothing is saved in this course.
P1. def f(x): return x + 1. f(4) is:
x is 4.
P2. A function with no return gives back:
The default is None.
P3. In def g(a, b): return a - b, g(10, 3) is:
Arguments match in order.
P4. A variable made inside a function is:
It lives only during the call.
P5. Defining a function without calling it:
A call is needed.
P6. print inside a function and return are:
Print shows, return gives.
P7. def sq(n): return n * n. sq(sq(2)) is:
sq(2) is 4, then sq(4) is 16.
P8. A function should ideally do:
One job.