Question 5(b)(i) 2012 · May-June · Paper 21 · 3 marks
Reveal official mark-scheme answer
Official answer for Question 5
Part (b)
(i)
Part (b)
(i)
–4
- 6
- function name takes a value
Show text version of question
Question 5
Part (b)
(i)
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
(i)
State two line numbers in the given pseudocode (other than lines 01 and 08) that For
show the subroutine is a function. Give your reason for choosing these. Examiner's Use
Line numbers
Reason
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_21.pdf
