Cambridge AS Level Computer Science 9618 · 6.2 Data Integrity

Q14 · 9618/11/M/J/21 Q6

Worked solution from the Security, privacy and data integrity Paper 1 Theory Fundamentals booklet, Part 2 of 2.

Q149618/11/M/J/21original Q6Structured · 3 marks
Question 6 from 9618/11/M/J/21

Worked solution

(a)

The algorithm rejects any value below 0 or above 10, so it checks that the value is between two limits.

Write: range check [1]

(b)

The algorithm rejects an empty input, so it checks that something was entered.

Write: presence check [1]

(c)

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]

KEY IDEAMatch the test to the check: limits mean range, empty means presence, a fixed list means existence.
TOTAL 3 marks

Official mark scheme

Mark scheme for 9618/11/M/J/21 question 6
VIDEO
▶ 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.