Past-paper question · 2025 October-November · Paper 22 · Q4(b)

Question 4(b) 2025 · October-November · Paper 22 · 6 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 mark point, max six

Question 6

✓
MP1
✓
Initialisation of variables – start location for checking and flag, if used
✓
MP2
✓
Input of email address into appropriate variable
✓
MP3
✓
Working condition-controlled loop present
✓
MP4
✓
Correct use of SUBSTRING
✓
MP5
✓
Use of condition for checking value extracted from SUBSTRING / '@'
✓
MP6
✓
Appropriate action if '@' found – loop termination
✓
MP7
✓
Appropriate action if '@' NOT found – check the next character and loop termination if no more characters
✓
MP8
✓
Output that only shows when the email address is valid or invalid. Both cases required.
✓
Example:
✓
// Variable declarations are not required
✓
INPUT EmailAddress
✓
Start 1
✓
Valid FALSE
✓
REPEAT
✓
IF SUBSTRING(EmailAddress, Start, 1) = '@'
✓
THEN
✓
Valid TRUE
✓
ELSE
✓
Start Start + 1
✓
ENDIF
✓
UNTIL Start > LENGTH(EmailAddress) OR Valid
✓
IF Valid
✓
THEN
✓
OUTPUT EmailAddress, " is valid"
✓
ELSE
✓
OUTPUT EmailAddress, " is NOT valid"
✓
ENDIF
✓
0478/22
✓
Cambridge IGCSE – Mark Scheme
✓
October/November 2025
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_w25_ms_22.pdf →

Show text version of question

Question 4

Part (b)

Part (b)

An email address can be validated by checking that it contains an @ symbol.

Write the pseudocode for an algorithm that will allow an email address to be input and check

whether or not it contains an @ symbol.

Output a suitable message with the result.

Use the string function SUBSTRING(EmailAddress, Start, 1) in your solution to return a string of length 1 character, starting at position Start, where EmailAddress is the identifier representing your input.

You do not need to declare any variables for this algorithm, but variables must be initialised as necessary. Assume there will not be more than one @ symbol in the email address input.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[6]

* 0000800000006 * DFD

Question 6

, ,

Topic relevance

Why this question appears here

98% 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_w25_qp_22.pdf

Keep practising this topic