Past-paper question · 2012 May-June · Paper 22 · Q5(a)
Question 5(a) 2012 · May-June · Paper 22 · 6 marks
Reveal official mark-scheme answer
Official answer for Question 5
Part (a)
Part (a)
✓
There are many different ways to represent the working
✓
Example:
- Happening (4) becomes Happening (3) + 4
- Happening (3) becomes Happening (2) + 3
- Happening (2) becomes Happening (1) + 2
- Ends at 1
- Diagram works back through function calls
- Happening (4) = 10
[6]
Show text version of question
Question 5
Part (a)
Question 5
Romana is learning about recursion. She designs a recursive function. For
Examiner's 01 FUNCTION Happening(Num) Use
02 IF Num = 1 03 THEN 04 Happening ← 1 05 ELSE 06 Happening ← Happening(Num - 1) + Num 07 ENDIF 08 ENDFUNCTION
Part (a)
Calculate the value returned by the function call Happening(4).
Show your working.
Happening(4)=
[6]
Question 11
Topic relevance
Why this question appears here
98% assigned-topic match · Computational thinking and problem-solving › Recursion
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9691_s12_qp_22.pdf
