Question 6(b) 2025 · May-June · Paper 22 · 1 mark
Reveal official mark-scheme answer
Official answer for Question 6
Part (b)
Question 1
Show text version of question
Question 6
Part (b)
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 (b)
State the purpose of the algorithm on page 6.
...................................................................................................................................................
.............................................................................................................................................
Why this question appears here
99% assigned-topic match · Programming › Programming concepts
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 2210_s25_qp_22.pdf
