Cambridge O Level Computer Science 2210 · 8.1 Programming concepts

Q23 · 2210/22/O/N/23 Q5

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

Q232210/22/O/N/23original Q5Structured · 3 marks
Question 5 from 2210/22/O/N/23

Worked solution

Write three points (one mark each):

Give variables and constants meaningful identifiers, so programmers (and future programmers) can understand their purpose [1]

Constants store values that never change while the program runs, for example a fixed tax rate [1]

Variables store values that can change while the program runs, for example a total that is calculated [1]

Also accepted: both are used for data storage.

KEY IDEAVariables hold data that can change; constants hold fixed data; both need meaningful names.
TOTAL 3 marks

Official mark scheme

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