Cambridge O Level Computer Science 2210 · 8.1 Programming concepts

Q24 · 2210/22/O/N/23 Q7

Worked solution from the Programming Paper 2 Algorithms, Programming and Logic booklet, Part 1 of 3.

Q242210/22/O/N/23original Q7Structured · 5 marks
Question 7 from 2210/22/O/N/23

Worked solution

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]

KEY IDEAUse SUBSTRING with a start position and a length, and LCASE for lower case.
TOTAL 5 marks

Official mark scheme

Mark scheme for 2210/22/O/N/23 question 7
VIDEO
▶ 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.