Computer Science (0478) · Oct/Nov 2025 · Mark scheme 22
Cambridge Computer Science (0478) mark scheme for paper 22, Oct/Nov 2025 — 0478/22/O/N/25, file 0478_w25_ms_22.pdf.
Text of this paper
www.dynamicpapers.com
Cambridge IGCSE™
COMPUTER SCIENCE
0478/22
Paper 2 Algorithms, Programming and Logic
October/November 2025
MARK SCHEME
Maximum Mark: 75
Published
This mark scheme is published as an aid to teachers and candidates, to indicate the requirements of the
examination. It shows the basis on which Examiners were instructed to award marks. It does not indicate the
details of the discussions that took place at an Examiners’ meeting before marking began, which would have
considered the acceptability of alternative answers.
Mark schemes should be read in conjunction with the question paper and the Principal Examiner Report f or
Teachers.
Cambridge International will not enter into discussions about these mark schemes.
Cambridge International is publishing the mark schemes f or the October/November 2025 series f or most
Cambridge IGCSE, Cambridge International A and AS Level components, and some Cambridge O Level
components.
This document consists of 21 printed pages.
© Cambridge University Press & Assessment 2025
[Turn over
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
Generic Marking Principles
October/November 2025
www.dynamicpapers.com
These general marking principles must be applied by all examiners when marking candidate answers. They should be applied alon gside the
specific content of the mark scheme or generic level descriptions for a question. Each question paper and mark scheme will also comply with these
marking principles.
GENERIC MARKING PRINCIPLE 1:
Marks must be awarded in line with:
•
•
•
the specific content of the mark scheme or the generic level descriptors for the question
the specific skills defined in the mark scheme or in the generic level descriptors for the question
the standard of response required by a candidate as exemplified by the standardisation scripts.
GENERIC MARKING PRINCIPLE 2:
Marks awarded are always whole marks (not half marks, or other fractions).
GENERIC MARKING PRINCIPLE 3:
Marks must be awarded positively:
•
•
•
•
•
marks are awarded for correct/valid answers, as defined in the mark scheme. However, credit is given for valid answers which go beyond
the scope of the syllabus and mark scheme, referring to your Team Leader as appropriate
marks are awarded when candidates clearly demonstrate what they know and can do
marks are not deducted for errors
marks are not deducted for omissions
answers should only be judged on the quality of spelling, punctuation and grammar when these features are specifically assess ed by the
question as indicated by the mark scheme. The meaning, however, should be unambiguous.
GENERIC MARKING PRINCIPLE 4:
Rules must be applied consistently, e.g. in situations where candidates have not followed instructions or in the application of generic level
descriptors.
© Cambridge University Press & Assessment 2025
Page 2 of 21
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
October/November 2025
www.dynamicpapers.com
GENERIC MARKING PRINCIPLE 5:
Marks should be awarded using the full range of marks defined in the mark scheme for the question (however; the use of the fu ll mark range may
be limited according to the quality of the candidate responses seen).
GENERIC MARKING PRINCIPLE 6:
Marks awarded are based solely on the requirements as defined in the mark scheme. Marks should not be awarded with grade thre sholds or
grade descriptors in mind.
© Cambridge University Press & Assessment 2025
Page 3 of 21
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
October/November 2025
www.dynamicpapers.com
Annotations guidance for centres
Examiners use a system of annotations as a shorthand for communicating their marking decisions to one another. Examiners are trained during the
standardisation process on how and when to use annotations. The purpose of annotations is to inform the standard isation and monitoring
processes and guide the supervising examiners when they are checking the work of examiners within their team. The meaning of annotations and
how they are used is specific to each component and is understood by all examiners who mark the component.
We publish annotations in our mark schemes to help centres understand the annotations they may see on copies of scripts. Note that there may
not be a direct correlation between the number of annotations on a script and the mark awarded. Similarly, the use of an annotation may not be an
indication of the quality of the response.
The annotations listed below were available to examiners marking this component in this series.
Annotations
Annotation Meaning
Correct point
Incorrect point
Follow through
Repetition
Ignore
Benefit of doubt given
Content of response too vague
Not answered question
Omission
Section not relevant
© Cambridge University Press & Assessment 2025
Page 4 of 21
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
Annotation Meaning
Section incorrect
Highlighter
Highlights part of the answer or shows structure of complex answers
Page or response seen by examiner
AO2 mark
AO3 mark
Not enough
Required item one
Required item two
Required item three
Correct awarding one mark
Correct awarding two marks
Correct awarding three marks
Correct awarding four marks
Correct awarding five marks
Correct awarding six marks
Correct awarding seven marks
Correct awarding eight marks
Correct awarding nine marks
© Cambridge University Press & Assessment 2025
Page 5 of 21
October/November 2025
www.dynamicpapers.com
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
October/November 2025
www.dynamicpapers.com
Mark scheme abbreviations
/
separates alternative words / phrases within a marking point
//
separates alternative answers within a marking point
underline actual word given must be used by candidate (grammatical variants accepted)
max
indicates the maximum number of marks that can be awarded
()
the word / phrase in brackets is not required, but sets the context
Note:
No marks are awarded for using brand names of software packages or hardware.
© Cambridge University Press & Assessment 2025
Page 6 of 21
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
Question
1
Answer
C
Question
2(a)
Marks
1
Answer
One mark per mark point, max five
Marks
5
• Line 01 / DECLARE Contacts : ARRAY[1:500, 1:4] OF REAL
should be DECLARE Contacts : ARRAY[1:500, 1:4] OF STRING
• Line 12 / OUTPUT FirstName
should be INPUT FirstName
• Line 17 / OUTPUT Contacts[Row, 1]
should be OUTPUT Contacts[Row, Column]
• Line 23 / NEXT Stop OR Row > 500
should be UNTIL Stop OR Row > 500
• Line 25 / 26 / Answer variable not declared
should be DECLARE Answer : CHAR before line 25
• Line 28 / Continue TRUE
should be Continue FALSE
© Cambridge University Press & Assessment 2025
October/November 2025
www.dynamicpapers.com
Page 7 of 21
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
Question
2(b)(i)
October/November 2025
www.dynamicpapers.com
Answer
One mark per mark point, max four
MP1
MP2
MP3
MP4
Marks
4
Appropriate parameter in PROCEDURE line
Correct index outer loop termination value; must use Number as stated in question
Correct array reference in INPUT
Correct termination of both loops.
Example:
PROCEDURE NewData(Number : INTEGER)
FOR Row 1 TO Number
FOR Column 1 TO 4
INPUT Contacts[Row, Column]
NEXT Column
NEXT Row
ENDPROCEDURE
2(b)(ii)
One mark per mark point, max two
MP1
MP2
2
Correct input statement
Correct call statement for NewData
Example:
INPUT MyNumber
CALL NewData(MyNumber)
2(c)(i)
One mark per mark point, max two
MP1
MP2
MP3
2
There may be more than one person with the given first name // The name may not exist/found in the array
The search will stop at the first occurrence and output the data for the wrong person
If the name is not present there could be no output / the loop will continue.
© Cambridge University Press & Assessment 2025
Page 8 of 21
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
Question
2(c)(ii)
Answer
One mark per mark point, max two
MP1
MP2
MP3
MP4
MP5
MP6
Marks
2
Introduce additional search criteria into the algorithm to make the search more specific to each person in the
array
… such as the last name to go with the first name // … such as some form of ID number / date of birth / contact
number / post code
The algorithm should be able to search the whole array to find all available matches
… by removing the stop variable
Use selection to confirm the name has not been found in the whole array
If the name is not present, output an appropriate message.
Question
3
October/November 2025
www.dynamicpapers.com
Answer
One mark for each correct box (underlined), max six
6
Test data
Type of test data
Purpose of test data
0
normal
to make sure that the program accepts data
that is in range
100 // –100
boundary
to make sure that the program rejects data
that is on the wrong side of the boundary
300
abnormal
to make sure that the program rejects data
that is outside acceptable limits
© Cambridge University Press & Assessment 2025
Marks
Page 9 of 21
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
Question
October/November 2025
www.dynamicpapers.com
Answer
Marks
4(a)
To check that the data entered has the required number of characters.
1
4(b)
One mark per mark point, max six
6
MP1
MP2
MP3
MP4
MP5
MP6
MP7
MP8
Initialisation of variables – start location for checking and flag, if used
Input of email address into appropriate variable
Working condition-controlled loop present
Correct use of SUBSTRING
Use of condition for checking value extracted from SUBSTRING / '@'
Appropriate action if '@' found – loop termination
Appropriate action if '@' NOT found – check the next character and loop termination if no more characters
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
© Cambridge University Press & Assessment 2025
Page 10 of 21
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
Question
5(a)
October/November 2025
www.dynamicpapers.com
Answer
Marks
One mark per mark point, max six
MP1
MP2
MP3
MP4
MP5
MP6
6
Correct Code column
Correct Store column
Correct Count column
First four CodeStore columns left unchanged
Correct CodeStore[5] and CodeStore[6] columns
Correct OUTPUT column
CodeStore[]
Code
7686
Store
FALSE
Count
[1]
[2]
[3]
[4]
aBcd
1532
Face
63q8
[5]
1
2
3
4
TRUE
5
7686
6
Face
FALSE
1
2
© Cambridge University Press & Assessment 2025
Page 11 of 21
[6]
OUTPUT
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
Question
October/November 2025
www.dynamicpapers.com
Answer
5(a)
Marks
CodeStore[]
Code
Store
Count
[1]
[2]
[3]
[4]
[5]
[6]
3
Code used before
Speed
432U
OUTPUT
Length must be 4
FALSE
1
2
3
4
5
TRUE
6
432U
7
© Cambridge University Press & Assessment 2025
CodeStore full
Page 12 of 21
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
Question
5(b)
Answer
One mark per mark point, max three
MP1
MP2
MP3
MP4
MP5
5(c)
October/November 2025
www.dynamicpapers.com
3
Checks that the length of the code input is 4 characters.
Checks the code against the array contents to see if it has been used before (in the last 6 codes)
If the code passes the tests, it is stored in the array
Stores the code in the lowest available index
Checks that the code store isn’t full before storing a new code // Outputs a code store is full message if appropriate
// Algorithm continues until the code store is full.
One mark per mark point, max four
MP1
MP2
MP3
MP4
Marks
4
Declaration of array using correct name and data type
Declaration of loop counter
Use of appropriate loop for six iterations (allow any type of loop)
Assignment of all array elements to null string (using loop counter as array index)
Example:
DECLARE CodeStore : ARRAY[1:6] OF STRING
DECLARE Index : INTEGER
FOR Index 1 TO 6
CodeStore[Index] ""
NEXT Index
© Cambridge University Press & Assessment 2025
Page 13 of 21
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
Question
6(a)
October/November 2025
www.dynamicpapers.com
Answer
Marks
One mark for each correct gate, with the correct input(s) as shown.
4
J
K
X
L
© Cambridge University Press & Assessment 2025
Page 14 of 21
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
Question
6(b)
Answer
Four marks for eight correct outputs
Three marks for six or seven correct outputs
Two marks for four or five correct outputs
One mark for two or three correct outputs
J
K
L
X
0
0
0
0
0
0
1
1
0
1
0
1
0
1
1
1
1
0
0
1
1
0
1
1
1
1
0
0
1
1
1
1
© Cambridge University Press & Assessment 2025
October/November 2025
www.dynamicpapers.com
Marks
4
Page 15 of 21
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
Question
Answer
October/November 2025
www.dynamicpapers.com
Marks
7(a)
It is used to uniquely identify records
1
7(b)
Two marks for all four fields correctly identified
One mark for two or three fields correctly identified
2
Data type
7(c)
Field
Boolean
CoastalHabitat
Integer
Lifespan
Real
Length // Wingspan
Text
Species // Family
One mark per mark point, max three
MP1
MP2
MP3
3
Correct data – spelt correctly
Correct layout – three columns, with no additional punctuation
Correct order (vertical and horizontal)
Correct output:
Bewick’s swan
Whooper swan
Mute swan
7(d)
120.2
150.0
150.0
190.5
230.0
220.2
One mark per correct line, max four
4
SELECT Species, Family, Lifespan
FROM WATERFOWL
WHERE Lifespan >= 10 ORDER BY Species;
© Cambridge University Press & Assessment 2025
Page 16 of 21
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
October/November 2025
www.dynamicpapers.com
Question
Answer
8
Use the tables for AO2 and AO3 below to award a mark in a suitable band using a best fit approach, then add up the total.
Marks are available for:
•
•
AO2 (maximum 9 marks)
AO3 (maximum 6 marks)
Data Structures required with names as given in the scenario:
Arrays or lists RandomNumber[], CountedNumber[]
Requirements (techniques)
R1 arrays and variables declared, then 100 000 random integers between 1 and 10, inclusive, generated and stored in an
array, (array and variable declarations, iteration, random number generation, rounding and storage).
R2 frequency of each random integer counted and results stored in array, then results sorted into descending order
(initialisation, selection, counting, sort, nested iteration, storage).
R3 calculation of the chance of each random integer occurring rounded to 4 d.p. and results output (iteration, rounding and
output).
Example 15-mark answer in pseudocode
// array and variable declaration
DECLARE RandomNumber : ARRAY[1:100000] OF INTEGER
DECLARE CountedNumber : ARRAY[1:10, 1:2] OF INTEGER
DECLARE Index1 : INTEGER
DECLARE Index2 : INTEGER
DECLARE Swap : BOOLEAN
DECLARE Temp1 : INTEGER
DECLARE Temp2 : INTEGER
// generate 100000 random integers between 1 and 10, inclusive,
// and store them in an array
FOR Index1 1 TO 100000
RandomNumber[Index1] ROUND(RANDOM() * 9, 0) + 1
NEXT Index1
© Cambridge University Press & Assessment 2025
Page 17 of 21
Marks
15
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
Question
8
October/November 2025
www.dynamicpapers.com
Answer
// initialising the CountedNumber array
FOR Index1 1 TO 10
CountedNumber[Index1, 1] Index1
CountedNumber[Index1, 2] 0
NEXT Index1
// counting the frequency of each of the random integers
// and storing the frequencies in an array
FOR Index1 1 TO 10
FOR Index2 1 TO 100000
IF RandomNumber[Index2] = CountedNumber[Index1, 1]
THEN
CountedNumber[Index1, 2] CountedNumber[Index1, 2] + 1
ENDIF
NEXT Index2
NEXT Index1
// performing sort on frequencies, so the possible random numbers
// are stored in descending order of frequency
Swap TRUE
WHILE Swap DO
// sort is terminated when no swaps take place during a pass
Swap FALSE
FOR Index1 1 TO 9
IF CountedNumber[Index1, 2] < CountedNumber[Index1 + 1, 2]
THEN
Temp1 CountedNumber[Index1, 1]
Temp2 CountedNumber[Index1, 2]
CountedNumber[Index1, 1] CountedNumber[Index1 + 1, 1]
CountedNumber[Index1, 2] CountedNumber[Index1 + 1, 2]
CountedNumber[Index1 + 1, 1] Temp1
CountedNumber[Index1 + 1, 2] Temp2
Swap TRUE
ENDIF
NEXT Index1
ENDWHILE
© Cambridge University Press & Assessment 2025
Page 18 of 21
Marks
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
Question
8
October/November 2025
www.dynamicpapers.com
Answer
// outputting the results, with chances for each random number
// calculated to 4 d.p.
// results in descending order of frequency
FOR Index1 1 TO 10
OUTPUT "The chance of ", CountedNumber[Index1, 1], " occurring is: "
OUTPUT ROUND(CountedNumber[Index1, 2]/100000, 4)
NEXT Index1
Alternative answer for first 20 lines after declarations, where RandomNumber[] is populated and frequency counted in the
same loop.
// initialising the CountedNumber array
FOR Index1 1 TO 10
CountedNumber[Index1, 1] Index1
CountedNumber[Index1, 2] 0
NEXT Index1
// generate random integers in an array,
// counting and storing the frequencies in an array
FOR Index1 1 TO 100000
Temp1 ROUND(RANDOM() * 9, 0) + 1
RandomNumber[Index1] Temp1
CountedNumber[Temp1, 2] CountedNumber[Temp1, 2] + 1
NEXT Index1
// performing sort on frequencies, so the possible random numbers
© Cambridge University Press & Assessment 2025
Page 19 of 21
Marks
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
October/November 2025
www.dynamicpapers.com
Marking Instructions in italics
AO2:
Apply knowledge and understanding of the principles and concepts of computer science to a given context, including the
analysis and design of computational or programming problems
0
No creditable
response.
1–3
4–6
7–9
At least one programming technique
has been used.
Any use of selection, iteration,
counting, totalling, input and output.
Some programming techniques used
are appropriate to the problem.
More than one technique seen applied
to the scenario, check the list of
techniques needed.
The range of programming techniques
used is appropriate to the problem.
All criteria stated for the scenario have
been covered by the use of
appropriate programming techniques,
check the list of techniques needed.
Some data has been stored but not
appropriately.
Any use of variables or arrays or other
language dependent data structures
e.g. Python lists.
Some of the data structures chosen
are appropriate and store some of the
data required.
More than one data structure used to
store data required by the scenario.
The data structures chosen are
appropriate and store all the data
required.
The data structures used store all the
data required by the scenario.
© Cambridge University Press & Assessment 2025
Page 20 of 21
0478/22
Cambridge IGCSE – Mark Scheme
PUBLISHED
October/November 2025
www.dynamicpapers.com
Marking Instructions in italics
AO3:
Provide solutions to problems by:
evaluating computer systems
making reasoned judgements
presenting conclusions
0
No creditable
response.
1–2
3–4
5–6
Program seen without relevant
comments.
Program seen with some relevant
comment(s).
The program has been fully
commented
Some identifier names used are
appropriate.
Some of the data structures used
have meaningful names.
The majority of identifiers used are
appropriately named.
Most of the data structures used have
meaningful names.
Suitable identifiers with names
meaningful to their purpose have been
used throughout.
All of the data structures used have
meaningful names.
The solution is illogical.
The solution contains parts that may
be illogical.
The program is in a logical order.
The solution is inaccurate in many
places.
Solution contains few lines of code
with errors that attempt to perform a
task given in the scenario.
The solution contains parts that are
inaccurate.
Solution contains lines of code with
some errors that logically perform
tasks given in the scenario. Ignore
minor syntax errors.
The solution is accurate.
Solution logically performs all the
tasks given in the scenario. Ignore
minor syntax errors.
The solution attempts at least one of
the requirements.
Solution contains lines of code that
attempt at least one task given in the
scenario.
The solution attempts to meet most of
the requirements.
Solution contains lines of code that
attempt most tasks given in the
scenario.
The solution meets all the
requirements given in the question.
Solution performs all the tasks given in
the scenario.
© Cambridge University Press & Assessment 2025
Page 21 of 21