Past-paper question · 2025 May-June · Paper 21 · Q4(b)

Question 4(b) 2025 · May-June · Paper 21 · 3 marks

Original past-paper question for 4(B)
Original past-paper question for 4(B)
Reveal official mark-scheme answer Official mark-scheme answer for 4(B)

Official answer for Question 4

Part (b)

✓
One mark per bullet point. Max 3

Question 3

✓
•
✓
Find length of input.
✓
•
✓
Use a suitable loop (repeat/while).
✓
•
✓
Using the correct condition
✓
•
✓
Prompt for a 13-digit telephone number and input number inside loop.
✓
0478/21
✓
Cambridge IGCSE – Mark Scheme
✓
May/June 2025
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_s25_ms_21.pdf →

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.

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

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

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

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

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

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

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

[3]
Topic relevance

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 0478_s25_qp_21.pdf

Keep practising this topic