Computer Science (2210) · May/June 2026 · Mark scheme · Paper 22

Cambridge O Level Computer Science mark scheme for Paper 22, May/June 2026 — 2210/22/M/J/26, file 2210 Computer Science June 2026 Mark Scheme 22.pdf.

Advertisement
Loading the paper…
Text of this paper

Cambridge O Level
COMPUTER SCIENCE

2210/22

Paper 2 Algorithms, Programming and Logic

May/June 2026

MARK SCHEME
Maximum Mark: 75

Published

This mark scheme contains the instructions and marking guidance that our examiners used to mark
candidate responses for this component.
Before they start marking, examiners complete a standardisation process. They review a range of candidate
responses and discuss the mark scheme in detail to agree which answers can and cannot be accepted.
Examiners award marks where it is clear that candidate responses have met the requirements of the mark
scheme. These requirements may vary between different components or different versions of the same
component, depending on the exact requirements of the question and the candidate responses seen during
the standardisation process.
Sometimes, our mark schemes may allow marks to be awarded to responses which contain elements that
are factually incorrect or for content not covered by the syllabus. We do this in response to the demands of a
specific question to support candidates and make sure that our assessments are fair. However, these
allowances should not be used as a guide for teaching and learning.
We cannot discuss the mark scheme with schools, and we recommend that schools read the mark scheme
together with the assessment material and the Principal Examiner Report for Teachers.

This document consists of 24 printed pages.
© Cambridge University Press & Assessment 2026

[Turn over

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

May/June 2026

General marking principles
All examiners must apply these marking principles when marking candidate responses.
1

Examiners must award marks for each response in line with:
•
•
•

the specific content defined in the mark scheme
the specific skills defined in the mark scheme or in the level descriptions
the standard of response required as exemplified by the standardisation scripts.

2

Examiners must award whole marks (not half marks, or other fractions).

3

Examiners must award marks positively. This means that:
•
•
•

marks are not deducted for errors or omissions
marks are awarded for correct/valid answers as defined in the mark scheme and also for other valid answers which go beyond the
scope of the syllabus and mark scheme referring to your team leader as appropriate
the quality of spelling, punctuation and grammar are judged only when the mark scheme indicates that these features are specifically
assessed in the question. However, the meaning of all responses must be unambiguous.

4

Examiners must consistently apply the requirements of the mark scheme and any rules for what to do when candidates have not followed
instructions correctly.

5

Examiners must use the full range of marks defined in the mark scheme, unless limited by the quality of the candidate responses seen.

6

Examiners must award marks according to the mark scheme and must not award marks with grade thresholds or grade descriptions in
mind.

© Cambridge University Press & Assessment 2026

Page 2 of 24

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

May/June 2026

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 standardisation 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 2026

Page 3 of 24

2210/22
Annotation

Cambridge O Level – Mark Scheme
PUBLISHED
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 2026

Page 4 of 24

May/June 2026

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

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 2026

Page 5 of 24

May/June 2026

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question
1

Answer

Marks

C
Answer

Marks

B

Guidance

1

Question

Answer

Marks

3(a)(i)

Presence (check)

1

3(a)(ii)

Check digit

1

One mark each

3

3(b)

Guidance

1

Question
2

May/June 2026

Guidance

BOD for arrangement
•
•
•

To check that the input matches a specified / required style / pattern / structure
… by containing set numbers of letters and numbers // … by containing specified
groups of digits // … by containing specific characters within the text
An example of a format e.g. date format dd/mm/yyyy

© Cambridge University Press & Assessment 2026

Page 6 of 24

Allow an @ within an email
address as an example

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question
3(c)

Answer

Marks

One mark each
•
•
•
•
•
•

Guidance

6 No array or variable declarations
required for this algorithm

Appropriate loop to iterate for 15 inputs
Input of a number
Test if the input is an integer e.g. use of MOD, DIV or ROUND functions
Repeated re-input if number not an integer, until it is an integer
Store integer in the correct array location
At least two outputs seen, from input prompt / error message / completion
message.

For example:
FOR Counter  1 TO 15
REPEAT
OUTPUT "Input a whole number"
INPUT Value
IF MOD(Value,1) <> 0
// IF ROUND(Value,0) <> Value
// IF DIV(Value,1) <> Value
THEN
OUTPUT "Your number was not an integer, please reinput"
ELSE
Accepted[Counter]  Value
ENDIF
UNTIL MOD(Value, 1) = 0
NEXT Counter
OUTPUT "The check has been completed"

© Cambridge University Press & Assessment 2026

May/June 2026

Page 7 of 24

Accept other methods for testing
if a number is an integer
Ignore case

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question
4

May/June 2026

Answer

Marks

One mark per mark point for coding, max three

6

•
•
•
•
•
•
•

Guidance

Writing the program code in a programming/coding language
… using pseudocode/flowcharts/structure diagrams from the design/earlier stage to
create your code
Documenting your code with comments // making sure your code is maintainable
Writing procedures/functions // Use library routines/functions
Using a compiler/interpreter/IDE when writing the code
Testing the code in small parts as you write it allow iterative testing
… to ensure that it works correctly / as expected // … to refine your code

One mark per mark point for testing, max three
•
•
•
•
•

The final stage of testing the whole program for errors
Use of test data with known outcomes
… to ensure the whole program produces the expected outcomes (from the test
data) // … to make sure the program accepts valid data and rejects invalid data
Correct errors // debug the code
Allow one mark max for identifying at least two types of test data e.g. normal,
abnormal, boundary, extreme

© Cambridge University Press & Assessment 2026

Page 8 of 24

Allow use of test data as BOD
for MP9

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question
5(a)

5(b)

Answer

Marks

One mark per mark point, max four

Guidance

4 Ignore case

•

Line 03 / DECLARE AccountID : INTEGER
should be DECLARE AccountID : STRING

•

Line 05 / OUTPUT AccountID
should be INPUT AccountID

•

Line 07 / CASE OF AccountID = Accounts[Row, 1]
should be IF AccountID = Accounts[Row, 1]

•

Line 09 / OUTPUT "The customer’s name is ", Accounts[1, 2]
should be OUTPUT "The customer’s name is ", Accounts[Row, 2]

01
02
03
04
05
06
07
08
09
10
11

DECLARE Accounts : ARRAY[1:1000, 1:2] OF STRING
DECLARE Row : INTEGER
DECLARE AccountID : STRING
OUTPUT "Please enter an account ID "
INPUT AccountID
FOR Row  1 TO 1000
IF AccountID = Accounts[Row, 1]
THEN
OUTPUT "The customer’s name is ", Accounts[Row, 2]
ENDIF
NEXT Row

Linear search

© Cambridge University Press & Assessment 2026

May/June 2026

1 Accept sequential search

Page 9 of 24

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question
5(c)

Answer

Marks

Adding to the existing corrected algorithm

Use/initialise a flag at the start / before line 06
Flag  FALSE // Flag  0
Between lines 08 and 10 (where the item has been found)
Flag  TRUE // Flag  1
Outside the loop / after line 11 add another selection statement and output
IF Flag = False …
… THEN OUTPUT "Account number not found in the array" ENDIF

For example:
01 DECLARE Accounts : ARRAY[1:1000, 1:2] OF STRING
02 DECLARE Row : INTEGER
03 DECLARE AccountID : STRING
DECLARE Flag : BOOLEAN
Flag  FALSE
04 OUTPUT "Please enter an account ID "
05 INPUT AccountID
06 FOR Row  1 TO 1000
07
IF AccountID = Accounts[Row, 1]
08
THEN
09
OUTPUT "The customer’s name is ", Accounts[Row, 2]
Flag  TRUE
10
ENDIF
11 NEXT Row
IF Flag = FALSE
THEN
OUTPUT "Account number not found in the array"
ENDIF

© Cambridge University Press & Assessment 2026

Guidance

5 If no location is given, Max 1 for
each of MP1/2 or MP3/4 or Max
2 for MP5/6/7.

Any five from:
•
•
•
•
•
•
•

May/June 2026

Page 10 of 24

The locations stated in the mark
points are for the use of
examiners. Any line numbers
quoted within these ranges,
inclusive, are accepted.
If a correct location is clearly
identified descriptively without
using line numbers, award the
mark.
Ignore case

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question
5(c)

Answer

Marks

OR replacing FOR loop with a WHILE loop

Guidance
If no location given, Max 1 for
each of MP1/2 or MP3/4 or Max
2 for MP5/6/7 Max 2 or
MP8/9/10.

Any five from:
•
•
•
•
•
•
•
•
•
•

May/June 2026

Use/initialise a flag at the start / before line 06
Flag  FALSE // Flag  0
Between lines 08 and 10 (where the item has been found)
Flag  TRUE // Flag  1
Outside the loop / after line 11 add another selection statement and output
IF Flag = False …
… THEN OUTPUT "Account number not found in the array " ENDIF
Replace lines 06 and 11 and increment counter before line 11
WHILE NOT Flag AND Row <= 1000 (DO)
Row  Row + 1 and ENDWHILE

The locations stated in the mark
points are for the use of
examiners. Any line numbers
quoted within these ranges,
inclusive, are accepted.
If a correct location is clearly
identified descriptively without
using line numbers, award the
mark.

For example:
01 DECLARE Accounts : ARRAY[1:1000, 1:2] OF STRING
02 DECLARE Row : INTEGER
03 DECLARE AccountID : STRING
DECLARE Flag : BOOLEAN
Row  1
Flag  FALSE
04 OUTPUT "Please enter an account ID "
05 INPUT AccountID
06 WHILE NOT Flag AND Row <= 1000 (DO)
07
IF AccountID = Accounts[Row, 1]
08
THEN
09
OUTPUT "The customer’s name is ", Accounts[Row, 2]
Flag  TRUE
10
ENDIF
Row  Row + 1

© Cambridge University Press & Assessment 2026

Page 11 of 24

Ignore case

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question
5(c)

Answer

Marks

11 ENDWHILE
IF Flag = FALSE
THEN
OUTPUT "Account number not found in the array"
ENDIF

© Cambridge University Press & Assessment 2026

May/June 2026

Page 12 of 24

Guidance

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question
6(a)

Answer

Marks

One mark for each correct column
Word

WordLength

Count

NumLetter

post

4

0

1

Choice

OUTPUT

2

4
Y
9

0

0

1
2

1

3
4
5

2

6
7

3

8
9

3
N

© Cambridge University Press & Assessment 2026

Guidance

6 If no other marks awarded, allow
1 mark for correct first
initialisation of Count and
NumLetter to 0 and 1
respectively
FT for the OUTPUT column for
candidate’s Count final values
for each word

3

committee

May/June 2026

Page 13 of 24

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question
6(b)

Answer

7(a)

Answer

Guidance

1

So the data is stored permanently // provides a non-volatile copy
So the data is not lost if the machine/program is switched off/crashes
So the data can be used again later // to provide a backup
So the data can be transported to a different (offline) computer // so the data can be
shared

One mark each
•
•
•
•

Guidance

1
Marks

One from:
•
•
•
•

7(b)

Marks

Counting/outputting the number of double/repeated/pairs of letters in a word

Question

May/June 2026

4 Ignore case

Declaration of an appropriately named variable
Correct statement to open Names.txt for reading
Correct statement to read data from the file into a variable
Correct statement to close Names.txt

For example:

If Names.txt not used, or
quotes are missing, penalise
once and FT
Accept single or double quotes
for the filename

DECLARE Name : STRING
OPENFILE "Names.txt" FOR READ
READFILE "Names.txt", Name
CLOSEFILE "Names.txt"

© Cambridge University Press & Assessment 2026

Filename and variable name
must be consistent throughout

Page 14 of 24

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question
8(a)

May/June 2026

Answer

Marks

One mark for each correct gate, with the correct inputs as shown.

5

A

B

Z

C

© Cambridge University Press & Assessment 2026

Page 15 of 24

Guidance

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question
8(b)

Answer

Marks

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
A

B

C

Z

0

0

0

1

0

0

1

0

0

1

0

1

0

1

1

1

1

0

0

1

1

0

1

1

1

1

0

1

1

1

1

0

© Cambridge University Press & Assessment 2026

May/June 2026
Guidance

4 emboldened parts given in
question

Page 16 of 24

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question
9(a)

Answer

Marks

One mark for every two correct data types
field

data type

Guidance

4 Emboldened parts given in
question
description

PartID

text

uniquely identifies the car part
with letters and numbers

PartName

text

name of the car part, for example
windscreen wiper

CarType

integer/text

four-digit number code to
represent the car type

Price

real

selling price to 2 decimal places

Size

text

specifies the size if relevant,
otherwise would say ‘one size’

Colour

character

single letter code for the colour
of the item

NumberInStock

Integer

the number of car parts in stock

InStock

Boolean/text/character/
integer

whether or not the part is in
stock

© Cambridge University Press & Assessment 2026

May/June 2026

Page 17 of 24

Ignore case

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question
9(b)

Answer

Marks

One mark each
•
•
•
•

May/June 2026

4 Ignore case on field names, but
spelling must match names in
table.

At least two correct fields in SELECT row
Remaining correct field in SELECT row
Correct FROM CAR_PARTS
Correct WHERE PartName = "brake pads";

Field names in SELECT line can
be in any order.
If space in field/table name,
penalise once and FT.

Correct code:
SELECT PartID, CarType, NumberInStock
FROM CAR_PARTS
WHERE PartName = "brake pads"; // PartName = 'brake pads';
9(c)

One mark each
•
•

Allow brake_pads, BrakePads,
BrakePad for MP4. Ignore minor
spelling errors e.g. break_pads
2

There is an alternative field NumberInStock
… a value of 0 in this field indicates the item is out of stock // … a positive value in
this field indicates the item is in stock // … this field indicates the quantity in stock

© Cambridge University Press & Assessment 2026

Guidance

Page 18 of 24

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question

Answer

10

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

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 Rainfall[]
Requirements (techniques)
R1 Declares of variables and array, initialises array, inputs daily rainfall in mm for a
year and stores it in the array (declarations, initialisation, iteration, input, output).
R2 Calculates the total rainfall for the year in cm rounded to 2 d.p., the mean average
rainfall in mm rounded to 4 d.p., the number of days with no rainfall and the longest
period of days with no rainfall (totalling, counting, iteration, rounding, selection,
finding max).
R3 Outputs the total rainfall for the year in cm, the average rainfall, the number of days
with no rainfall and the longest period of days with no rainfall. Determines if a
drought occurred and outputs the result (output, selection).

© Cambridge University Press & Assessment 2026

May/June 2026

Page 19 of 24

15

Guidance

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question
10

Answer

Marks

Example 15-mark answer in pseudocode:
// array and variable declaration
DECLARE Rainfall : ARRAY[1:365] OF REAL
DECLARE Index : INTEGER
DECLARE TotalRain : REAL
DECLARE AverageRain : REAL
DECLARE NoRain : INTEGER
DECLARE DryDays : INTEGER
DECLARE MaxDryDays : INTEGER
// initialising array
FOR Index  1 TO 365
Rainfall[Index]  0
NEXT Index
// daily input of rainfall
FOR Index  1 TO 365
OUTPUT "Input the rainfall measurement for day ", Index
INPUT Rainfall[Index]
NEXT Index
// finding the total and average rainfall
TotalRain  0
FOR Index  1 TO 365
TotalRain  TotalRain + Rainfall[Index]
NEXT Index
// average daily rainfall to 4dp
AverageRain  ROUND(TotalRain/365, 4)
// total rainfall in cm to 2dp
TotalRain  ROUND(TotalRain/10, 2)

© Cambridge University Press & Assessment 2026

May/June 2026

Page 20 of 24

Guidance

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question
10

Answer

Marks

// counting the number of days with no rain
NoRain  0
FOR Index  1 TO 365
IF Rainfall[Index] = 0
THEN
NoRain  NoRain + 1
ENDIF
NEXT Index
// finding the longest number of consecutive rain free days
IF NoRain > 0
THEN
MaxDryDays  1
DryDays  1
FOR Index  1 TO 365-1
IF Rainfall[Index] = 0 AND Rainfall[Index + 1] = 0
THEN
DryDays  DryDays + 1
IF DryDays > MaxDryDays
THEN
MaxDryDays  DryDays
ENDIF
ELSE
DryDays  1
ENDIF
NEXT Index
ELSE
MaxDryDays  0
DryDays  0
ENDIF

© Cambridge University Press & Assessment 2026

May/June 2026

Page 21 of 24

Guidance

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

Question

Answer

10

// outputting the statistics with messages
OUTPUT "The total rainfall for the year was ", TotalRain, " cm"
OUTPUT "The average daily rainfall was ", AverageRain, " mm"
OUTPUT "The total number of days with no rainfall was ", NoRain,
" day(s)"
OUTPUT "The longest period with no rainfall was ", MaxDryDays, "
day(s)"

Marks

// checking if there was a drought
IF MaxDryDays >= 15
THEN
OUTPUT ""
OUTPUT "There was a drought this year because the longest
period with no rainfall was 15 days or longer"
ELSE
OUTPUT ""
OUTPUT "There was no drought this year, because the longest
period with no rainfall was shorter than 15 days"
ENDIF

© Cambridge University Press & Assessment 2026

May/June 2026

Page 22 of 24

Guidance

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

May/June 2026

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 2026

Page 23 of 24

2210/22

Cambridge O Level – Mark Scheme
PUBLISHED

May/June 2026

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 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 2026

Page 24 of 24

Advertisement