Past-paper question · 2013 October-November · Paper 21 · Q4

Question 4 2013 · October-November · Paper 21 · 17 marks

Original past-paper question for 4
Reveal official mark-scheme answer

Official answer for Question 4

Part (a)

–

✓
within the function
[1]

Mark scheme 9691_w13_ms_21.pdf →

Show text version of question

Question 4

[4]

Part (d)

Re-write the pseudocode using a REPEAT – UNTIL loop.

Make use of the techniques you gave in

Part (c)

to produce self-documented code.

[6]

Question 14

Part (e)

(i)

If Juan were to perform a dry run on the pseudocode using a trace table, state one For

type of error he might find. Give an example. Examiner's Use

Type 1

Example

State another type of error he might find later. Give an example.

Type 2

Example

[4]

(ii)

Juan has written his program and one module appears not to work.

Explain how Juan can use a break point and stepping to debug his program.

[3]

Question 15

4 Juan is also learning about recursion. He writes the pseudocode for a recursive function. For Examiner's 1 FUNCTION Add(N) Use 2 DECLARE R 3 IF N <= 0 4 THEN

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_w13_qp_21.pdf

Keep practising this topic