IGCSE · Practice questions · Validation and verification checks

Reject the nonsense.

Six original Cambridge-style questions on validation and verification checks.

Original questions All questions on this page are original work, written in the Cambridge IGCSE style. They are not from past papers. They test the same concepts and skills the syllabus rewards.
Keep these straight

Allowed, or as intended?

01
Explain
[2 marks]

Explain why validation checks are needed on input data.

  • To make sure only sensible / reasonable data that meets the rules is accepted. ✓
  • So that impossible or unreasonable data is rejected before it is processed or stored (reducing errors in the output). ✓
02
Apply
[4 marks]

A sign-up form asks for a username (6 to 12 characters), an age (13 to 99) and an email address. Identify a suitable validation check for each, and one more check that applies to all three fields.

  • Username: length check (6 to 12 characters). ✓
  • Age: range check (13 to 99) or type check (integer). ✓
  • Email: format check (contains @ and a full stop in the right places). ✓
  • All three: presence check (none may be left empty). ✓
03
Calculate
[3 marks]

An ISBN-13 is entered as 9781234567896. Use the check digit method (weights 1 and 3, sum MOD 10, subtract from 10) to show that it has been entered incorrectly.

  • Weighted sum of the first 12 digits: 9 + 21 + 8 + 3 + 2 + 9 + 4 + 15 + 6 + 21 + 8 + 27 = 133. ✓
  • 133 MOD 10 = 3; 10 − 3 = 7. ✓
  • The calculated check digit 7 does not match the entered digit 6, so there is an error. ✓
04
Write
[4 marks]

Write pseudocode to input a percentage and use a range check so that only values from 0 to 100 inclusive are accepted. An error message must be output for each invalid value.

  • Prompt and INPUT Percentage. ✓
  • Loop (WHILE or REPEAT) while Percentage < 0 OR Percentage > 100. ✓
  • Output an error message inside the loop. ✓
  • INPUT Percentage again inside the loop, so the loop ends when the value is valid. ✓
05
Explain
[2 marks]

Describe how a double entry check works.

  • The data is entered twice (e.g. a new password typed twice). ✓
  • The computer compares the two entries; if they do not match, the data is rejected and must be entered again. ✓
06
Analysis
[2 marks]

A student's date of birth is entered as 14/07/2010 instead of 17/04/2010. Explain why a format check does not detect this error, and name a check that could.

  • The wrong date still has the correct DD/MM/YYYY format (and is a possible date), so it passes the format check. ✓
  • A verification check: a visual check against the original document (or double entry). ✓

Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.