Question 4(a) 2025 · May-June · Paper 21 · 5 marks
Reveal official mark-scheme answer
Official answer for Question 4
Part (a)
Question 5
Show text version of question
Question 4
Part (a)
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 (a)
Write an algorithm using pseudocode to:
- input the telephone number
- extract the 2-digit country code
- output the matching country
- output ‘Unknown’ if there is no matching country.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................
Question 5
, ,
Why this question appears here
94% 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
