Worked solution from the Security, privacy and data integrity Paper 1 Theory Fundamentals booklet, Part 2 of 2.
The algorithm rejects any value below 0 or above 10, so it checks that the value is between two limits.
Write: range check [1]
The algorithm rejects an empty input, so it checks that something was entered.
Write: presence check [1]
The algorithm accepts only values from a fixed list (Red, Yellow, Blue), so it checks that the value exists in that list.
Write: existence check [1]
▶ Whole paper
Video solution of the whole paper · by qiphyedu. 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.