Worked solution from the Programming Paper 2 Algorithms, Programming and Logic booklet, Part 1 of 3.
Count the characters: "The Mind" starts at position 25 and is 8 characters long (including the space).
Quote ← "Learning Never Exhausts The Mind" Start ← 25 Number ← 8 OUTPUT SUBSTRING(Quote, Start, Number) OUTPUT LCASE(Quote)
Store the string in Quote [1]
Correct start value, 25 [1]
Correct number of characters, 8 [1]
Use of SUBSTRING with Quote and two other parameters, and its result output [1]
Use of LCASE on Quote, and the result output [1]
▶ Whole paper
Video solution of the whole paper · by Paper solver.. Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.