Past-paper question · 2025 May-June · Paper 22 · Q6(a)

Question 6(a) 2025 · May-June · Paper 22 · 6 marks

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

Official answer for Question 6

Part (a)

✓
One mark per mark point

Question 6

✓
MP1
✓
Correct Number and Index columns
✓
MP2
✓
Correct Word column
✓
MP3
✓
Correct Continue column
✓
MP4
✓
Correct V1 and V2 column
✓
MP5
✓
Correct L1 and L2 column
✓
MP6
✓
Correct OUTPUT column
✓
Number Index
✓
Word
✓
Continue V1 V2 L1 L2
✓
OUTPUT

Question 2

Question 1

✓
RACECAR
✓
TRUE

Question 1

Question 7

✓
R
✓
R

Question 2

Question 6

✓
A
✓
A

Question 3

Question 5

✓
C
✓
C

Question 4

Question 4

✓
Successful

Question 2

✓
TREAT
✓
TRUE

Question 1

Question 5

✓
T
✓
T

Question 2

Question 4

✓
R
✓
A
✓
FALSE
✓
successful

Mark scheme 0478_s25_ms_22.pdf →

Show text version of question

Question 6

Part (a)

Question 6

This pseudocode is an algorithm.

DECLARE Word : STRING DECLARE V1 : INTEGER DECLARE V2 : INTEGER DECLARE Number : INTEGER DECLARE Index : INTEGER DECLARE L1 : CHAR DECLARE L2 : CHAR DECLARE Continue : BOOLEAN INPUT Number

FOR Index 1 TO Number INPUT Word Continue TRUE V1 1 V2 LENGTH(Word) WHILE Continue = TRUE AND V1 < V2 DO L1 SUBSTRING(Word, V1, 1) L2 SUBSTRING(Word, V2, 1) IF L1 <> L2 THEN Continue FALSE ELSE

V1 V1 + 1 V2 V2 – 1 ENDIF ENDWHILE IF Continue = TRUE THEN OUTPUT "Successful" ELSE OUTPUT "NOT successful" ENDIF NEXT Index

Question 7

, ,

Part (a)

Complete the trace table for the algorithm, using the input data:

2, RACECAR, TREAT

Number Index Word Continue V1 V2 L1 L2 OUTPUT

[6]
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_22.pdf

Keep practising this topic