Exam-style question
Try this first
What is the value of total after this Python 3 code runs? def get_values(): return 3, 4 first, second = get_values() total = first + second.
- A.3
- B.4
- C.7
- D.34
Model answer
What a good answer should say
- 7
Explanation
Why this works
The subroutine returns two values, 3 and 4. They are assigned to first and second respectively, so total becomes 3 + 4, which is 7.
Common mistake
No common mistake is linked to this question yet.
