03 — Practice solutions
These are independently written explanations, not an official marking scheme.
03A
10 accepted (normal); 1 and 20 accepted (valid boundaries); 0 and 21 rejected (just outside boundaries). Double entry compares two independently entered values to detect differences in transcription. Range validation checks the entered value against 1–20; a mistyped value of 12 instead of 13 passes it.
Reasoning
Inclusive limits require1 and 20 to pass. Their immediate neighbours0 and 21 should fail; these catch an accidental strict comparison. A normal accepted value checks ordinary behaviour, not the boundary. Double entry is a different mechanism from checking the numeric range.
03B
Weighted sum 1×6+0×5+0×4+0×3+3×2 = 12, remainder 1, so 10003X. Text allows X and preserves leading zeroes; the identifier is not a quantity. Some erroneous identifiers can produce the same check character, and a matching check character does not establish that the identifier was actually issued.
Reasoning
Apply weights to the five data digits only. Sum12 has remainder1, which triggers the explicitly supplied X mapping. Writing the number10 would incorrectly make the check character two characters long.