Cambridge O Level Computer Science 2210 · 7.6 Suitable test data

Q37 · 2210/21/M/J/22 Q3

Worked solution from the Algorithm design and problem-solving Paper 2 Algorithms, Programming and Logic booklet, Part 5 of 8.

Q372210/21/M/J/22original Q3Structured · 4 marks
Question 3 from 2210/21/M/J/22

Worked solution

An email address needs one @ symbol and should look like a name, then @, then a domain.

Normal test data: computerscience@cambridge.org.uk (any valid email address) [1]

Reason: it is a valid email address with an @ symbol, so it should be accepted [1]

Erroneous test data: computerscienceisgreat (any text with no @) [1]

Reason: it is just a string; an email address needs a single @, so it should be rejected [1]

KEY IDEANormal data should be accepted; erroneous data breaks the rules and should be rejected.
TOTAL 4 marks

Official mark scheme

Mark scheme for 2210/21/M/J/22 question 3
VIDEO
▶ Topic lesson

A lesson on this topic · by Craig'n'Dave. 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.