Past-paper question · 2025 May-June · Paper 23 · Q3(a)

Question 3(a) 2025 · May-June · Paper 23 · 4 marks

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

Official answer for Question 3

Part (a)

✓
One mark per mark point

Question 4

✓
•
✓
Line 02 / DECLARE Index : CHAR
✓
should be DECLARE Index : INTEGER
✓
•
✓
Line 07 / Stop FALSE
✓
should be Stop TRUE
✓
•
✓
Line 08 / FOR Index 1 TO 50
✓
should be FOR Index 1 TO 999 // FOR Index 1 TO 1000 - 1
✓
•
✓
Line 17 / NEXT Stop
✓
should be ENDWHILE

Mark scheme 0478_s25_ms_23.pdf →

Show text version of question

Question 3

Part (a)

Question 3

The purpose of this pseudocode algorithm is to carry out a bubble sort to sort, in descending

order, 1000 numbers stored in a one-dimensional (1D) array.

01 DECLARE Values : ARRAY[1:1000] OF REAL 02 DECLARE Index : CHAR 03 DECLARE Stop : BOOLEAN 04 DECLARE Hold : REAL 05 Stop FALSE 06 WHILE NOT Stop DO 07 Stop FALSE 08 FOR Index 1 TO 50

09 IF Values[Index + 1] > Values[Index] 10 THEN 11 Hold Values[Index] 12 Values[Index] Values[Index + 1] 13 Values[Index + 1] Hold 14 Stop FALSE 15 ENDIF 16 NEXT Index 17 NEXT Stop

Part (a)

Identify the line numbers of four errors in the pseudocode and suggest a correction for each

error.

Error 1 line number ...............................

Correction .................................................................................................................................

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

Error 2 line number ...............................

Correction .................................................................................................................................

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

Error 3 line number ...............................

Correction .................................................................................................................................

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

Error 4 line number ...............................

Correction .................................................................................................................................

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

[4]

Question 5

, ,

Topic relevance

Why this question appears here

98% assigned-topic match · Algorithm design and problem-solving

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 0478_s25_qp_23.pdf

Keep practising this topic