Exam-style question
Try this first
In Python 3, what value is stored in result after this code runs? def double(number): return number * 2 result = double(6).
- A.6
- B.8
- C.12
- D.None
Model answer
What a good answer should say
- 12
Explanation
Why this works
The subroutine receives 6, calculates 6 multiplied by 2, and returns 12 to the calling routine. The returned value is then assigned to result.
Common mistake
No common mistake is linked to this question yet.
