Past-paper question · 2012 May-June · Paper 22 · Q5(b)(ii)
Question 5(b)(ii) 2012 · May-June · Paper 22 · 2 marks
Reveal official mark-scheme answer
Official answer for Question 5
Part (b)
(ii)
(ii)
–6
- function defined in terms of itself
[2]
Show text version of question
Question 5
Part (b)
(ii)
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
(ii)
State the line number in the given pseudocode that shows the function is
recursive. Give your reason for choosing this.
Line number
Reason
[2]
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
