Worked solution from the Algorithm design and problem-solving Paper 2 Algorithms, Programming and Logic booklet, Part 5 of 8.
Validation checks that data is allowed.
Validation is an automated check carried out by the computer [1]
It makes sure the data entered is sensible, reasonable or acceptable [1]
The check accepts whole numbers from 30 to 200.
Normal test data: 75 [1]
Reason: it is inside the range, so it should be accepted [1]
Abnormal test data: Sixty (a word) [1]
Reason: it is the wrong data type, so it should be rejected [1]
Extreme test data: 200 [1]
Reason: it is the highest value in the range, so it should be accepted [1]
Other correct values score, for example 30 as extreme, or 20 as abnormal.
▶ 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.