Six original Cambridge-style questions on validation and verification checks.
Explain why validation checks are needed on input data.
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.
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.
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.
Describe how a double entry check works.
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.
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.