Past-paper question · 2018 October-November · Paper 41 · Q4(a)(i)

Question 4(a)(i) 2018 · October-November · Paper 41 · 1 mark

Original past-paper question for 4(A)(I)
Original past-paper question for 4(A)(I)
Reveal official mark-scheme answer Official mark-scheme answer for 4(A)(I)

Official answer for Question 4

Part (a)

(i)

✓
A function/subroutine defined in terms of itself // a function/subroutine that calls itself

Question 1

Mark scheme 9608_w18_ms_41.pdf →

Show text version of question

Question 4

Part (a)

(i)

Question 4

The recursive algorithm for the Calculate() function is defined as follows:

01 FUNCTION Calculate(BYVALUE Number : INTEGER) RETURNS INTEGER

02 IF Number = 0

03 THEN

04 Calculate −10

05 ELSE

06 Calculate Number * Calculate(Number − 1)

07 ENDIF

08 ENDFUNCTION

(i)

State what is meant by a recursive algorithm.

...........................................................................................................................................

......................................................................................................................................

[1]
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 9608_w18_qp_41.pdf

Keep practising this topic