Past-paper question · 2022 October-November · Paper 21 · Q3(a)

Question 3(a) 2022 · October-November · Paper 21 · 6 marks

Original past-paper question for 3(A)
Reveal official mark-scheme answer Official mark-scheme answer for 3(A)

Official answer for Question 3

Part (a)

✓
Two marks per check, description must match name of check if given, max six

Question 6

✓
•
✓
Check 1 use a type check
✓
o
✓
to ensure that the value is a number / integer
✓
•
✓
Check 2 use a length check
✓
o
✓
to ensure that there are only 4 characters / digits
✓
•
✓
Check 3 use a range check
✓
o
✓
to ensure that the value is >= 1000 and <=9999

Mark scheme 0478_w22_ms_21.pdf →

Show text version of question

Question 3

Part (a)

A
PIN (personal identification number) is input into a banking app by the user. Before the PIN

is accepted, the following validation checks are performed:

  • check 1 – each character must be a digit
  • check 2 – there must be exactly four digits
  • check 3 – the value of the PIN must be between 1000 and 9999 inclusive.

Describe each validation check.

Check 1 ....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Check 2 ....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Check 3 ....................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

[6]
Topic relevance

Why this question appears here

98% assigned-topic match · Algorithm design and problem-solving

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 0478_w22_qp_21.pdf

Keep practising this topic