Question 4(b) 2025 · May-June · Paper 21 · 3 marks
Reveal official mark-scheme answer
Official answer for Question 4
Part (b)
Question 3
Show text version of question
Question 4
Part (b)
Question 4
A telephone number with 13 characters is input. The first character is a ‘+’, followed by a 2-digit
country code, for example:
+20xxxxxxxxxx where 20 is the country code and x is a digit between 0 and 9 inclusive.
The algorithm includes checks for the country codes: 44 for the UK and 20 for Egypt.
Part (b)
Explain how you could change the algorithm to repeatedly prompt for the telephone number
until the number entered is 13 characters in length.
Any code used must be fully explained.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................
Why this question appears here
80% assigned-topic match · Programming › Programming concepts
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 2210_s25_qp_21.pdf
