Cambridge O Level Computer Science 2210 · 8.1 Programming concepts

Q17 · 2210/21/M/J/23 Q6

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

Q172210/21/M/J/23original Q6Structured · 4 marks
Question 6 from 2210/21/M/J/23

Worked solution

1

Write: Meaningful identifiers (names that describe what the variable, array or constant is for) [1]

Reason: so the programmer, or a later programmer, can easily see the purpose of each variable and follow it through the program. [1]

2

Write: Comments (notes that explain sections of the code) [1]

Reason: so a programmer can find a section quickly and knows what it is for. [1]

Using procedures and functions also scores (reason: the program is modular and easier to update).

KEY IDEAMeaningful names, comments and procedures make a program easy to read and change later.
TOTAL 4 marks

Official mark scheme

Mark scheme for 2210/21/M/J/23 question 6
VIDEO
▶ Whole paper

Video solution of the whole paper · by ZAINEMATICS. 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.