Computer Science (9618) · Oct/Nov 2025 · Mark scheme 22

Cambridge Computer Science (9618) mark scheme for paper 22, Oct/Nov 2025 — 9618/22/O/N/25, file 9618_w25_ms_22.pdf.

Advertisement
Loading the paper…
Text of this paper

www.dynamicpapers.com

Cambridge International AS & A Level
COMPUTER SCIENCE

9618/22

Paper 2 Fundamental Problem-solving and Programming Skills

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 15 printed pages.
© Cambridge University Press & Assessment 2025

[Turn over

9618/22

October/November
www.dynamicpapers.com

Cambridge International AS & A Level – Mark Scheme
PUBLISHED

2025

Generic Marking Principles
These general marking principles must be applied by all examiners when marking candidate answers.
They should be applied alongside 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 assessed 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.
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 full 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 thresholds or grade descriptors in mind.

© Cambridge University Press & Assessment 2025

Page 2 of 15

9618/22

October/November
www.dynamicpapers.com

Cambridge International AS & A Level – Mark Scheme
PUBLISHED

2025

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
Benefit of the doubt
To indicate where a key word/phrase/code is missing
Incorrect
Follow through
Indicate a point in an answer

Highlighted text

To draw attention to a particular aspect or to indicate where parts of an answer
have been combined
Ignore
Not answered question
No examples or not enough
Not relevant or used to separate parts of an answer

Off-page
comment

Allows comments to be entered at the bottom of the RM marking window and
then displayed when the associated question item is navigated to.
Repetition
Indicates that work or a page has been seen including blank answer spaces
and blank pages.
Correct
Too vague

© Cambridge University Press & Assessment 2025

Page 3 of 15

9618/22

October/November
www.dynamicpapers.com

Cambridge International AS & A Level – Mark Scheme
PUBLISHED

Mark scheme abbreviations
/
//
underline
max
()

separates alternative words / phrases within a marking point
separates alternative answers within a marking point
actual word(s) given must be used by candidate (grammatical variants accepted)
indicates the maximum number of marks that can be awarded
the word / phrase in brackets is not required, but sets the context

© Cambridge University Press & Assessment 2025

Page 4 of 15

2025

October/November
www.dynamicpapers.com

9618/22

Cambridge International AS & A Level – Mark Scheme
PUBLISHED

Question
1(a)

2025

Answer
Pseudocode example

Marks

Selection

Iteration

Subroutine

IF Status = FALSE THEN
FOR Count  1 TO 20
CALL Reset(Count)
NEXT Count
ENDIF

OTHERWISE : Status  TRUE


WHILE AllDone() = TRUE
30 : NextChar  'X'

4

One mark per row
1(b)

Variable

Example data value

3

Data type
REAL

Result

5.42

MonthLetter

"JFMAMJJASOND"

Birthday

15/11/2009

STRING
DATE

One mark per row
1(c)

Expression

FALSE

INT(Result) + 1 > 6
NUM_TO_STR(LENGTH(MonthLetter))
NUM_TO_STR(Result + "3.2")
MID(MonthLetter, MONTH(Birthday) — 2, 1)
One mark per row

© Cambridge University Press & Assessment 2025

Evaluates to

Page 5 of 15

"12"
ERROR
"S"

4

9618/22

October/November
www.dynamicpapers.com

Cambridge International AS & A Level – Mark Scheme
PUBLISHED

Question

Answer

2

2025

Marks
5

Mark as follows:
MP1
Initialisation of the array index
MP2
Input number in a loop
MP3
Test for termination value (99.9) and correct ending
MP4
Test for array full / maximum 20 iterations and correct ending
MP5
Assign number to Data array element and increment index

© Cambridge University Press & Assessment 2025

Page 6 of 15

9618/22

October/November
www.dynamicpapers.com

Cambridge International AS & A Level – Mark Scheme
PUBLISHED

Question
2

Answer
Alternative solution:

© Cambridge University Press & Assessment 2025

Page 7 of 15

2025

Marks

October/November
www.dynamicpapers.com

9618/22

Cambridge International AS & A Level – Mark Scheme
PUBLISHED

Question
3(a)

Answer
Mark as follows:
1

open the file OldFile.txt in read (mode)

MP2

2

open the file NewFile.txt in write (mode)

3

read a line from OldFile.txt and store in LineX

4

read a line from OldFile.txt and store in LineY

5

read a line from OldFile.txt and store in LineZ

6

set NewString to

MP4

Marks
6

MP1

MP3

2025

LineX & '\' & LineY & '\' & LineZ
MP5

7

write NewString to NewFile.txt

MP6

8

repeat from step 3 until end of OldFile.txt

9

close both files

3(b)

It does not appear in (any of) the data items
// it does not appear in the ID and Name

1

3(c)

MP1
MP2
MP3
MP4

3

Add a (single) new separator at the end of the third (original) item
Calculate the length of both new data items
Store / append the length (of the new each items)
as a fixed length / separated digit string // by example

Max 3

© Cambridge University Press & Assessment 2025

Page 8 of 15

October/November
www.dynamicpapers.com

9618/22

Cambridge International AS & A Level – Mark Scheme
PUBLISHED

Question
4(a)

Answer

2025

Marks

Example solution:

4

DECLARE CheckTotal : ARRAY [0:35] OF BOOLEAN
DECLARE Index : INTEGER
FOR Index  0 TO 35
CheckTotal[Index]  FALSE
NEXT Index
Mark as follows:
MP1
MP2
MP3
MP4

Declaration of CheckTotal array
Declaration of a loop counter
Loop – with correct syntax and number of iterations
Assignment of array element to FALSE

4(b)

5
DECLARE EasyQ, HardQ : INTEGER
FOR EasyQ 

0

TO 15 STEP

MP1

3

MP2

FOR HardQ  0 TO

20

STEP

MP3

MP4

CheckTotal[HardQ
NEXT HardQ

5

+ EasyQ]

 TRUE

MP5

NEXT EasyQ
Mark as follows:
One mark per gap (boldened)
4(c)

MP1
MP2
MP3
MP4

Check that the parameter value is in the range 0 to 35
... and if not, return FALSE
Use the parameter value as the index to array CheckTotal
Return the value from given index position

© Cambridge University Press & Assessment 2025

Page 9 of 15

4

9618/22

October/November
www.dynamicpapers.com

Cambridge International AS & A Level – Mark Scheme
PUBLISHED

Question

Answer

5(a)

Activity

Marks
Name of life cycle stage

a structure chart is produced

2025

4

Design

a program is modified to allow it to run on new
hardware

Maintenance

the programmer identifies the customer's
requirements

Analysis

an Integrated Development Environment (IDE)
provides context-sensitive help such as 'autocomplete'

Coding

One mark per row
5(b)

Acceptance testing

© Cambridge University Press & Assessment 2025

1

Page 10 of 15

October/November
www.dynamicpapers.com

9618/22

Cambridge International AS & A Level – Mark Scheme
PUBLISHED

Question
6

Answer
Example solution:

S1Length  LENGTH(String1)
IF LENGTH(String2) < S1Length THEN
RETURN FALSE // String2 is shorter than String1
ENDIF
IF CaseMatters = FALSE THEN
String1  TO_UPPER(String1)
String2  TO_UPPER(String2)
ENDIF
CASE Position
'e' : String2  RIGHT(String2, S1Length)
's' : String2  LEFT(String2, S1Length)
ENDCASE
IF String1 = String2 THEN
RETURN TRUE
ELSE
RETURN FALSE
ENDIF
ENDFUNCTION
Mark as follows:

MP6
MP7

Function heading and parameters and ending and return type
Calculate length of String1
if String2 is shorter than String1, return FALSE
Compare (modified) strings
Test CaseMatters - if FALSE and convert two string(s) to same
case
Test for the value of ‘s’/’e’ and form modified string(s) in one or both
cases
Return appropriate BOOLEAN value in all cases

© Cambridge University Press & Assessment 2025

Marks
7

FUNCTION Compare(String1, String2 : STRING, __
CaseMatters : BOOLEAN, Position : CHAR) RETURNS
BOOLEAN
DECLARE S1Length : INTEGER

MP1
MP2
MP3
MP4
MP5

2025

Page 11 of 15

October/November
www.dynamicpapers.com

9618/22

Cambridge International AS & A Level – Mark Scheme
PUBLISHED

Question
7(a)

Answer

2025

Marks

Example explanation:

2

The arrow means that Convert repeatedly calls Analyse then Update and
then Sort (in that order)10

7(b)

MP1
MP2

Reference to ‘repetition’…’
Naming all four modules correctly and the sequence is stated or
implied

MP1

PROCEDURE Analyse (Count : INTEGER)

FUNCTION Update (Key : STRING) RETURNS INTEGER
MP2
MP4

MP3

PROCEDURE Sort (BYREF P2 : BOOLEAN)

Mark as follows:
One mark per underlined part

© Cambridge University Press & Assessment 2025

Page 12 of 15

4

9618/22

October/November
www.dynamicpapers.com

Cambridge International AS & A Level – Mark Scheme
PUBLISHED

Question
8(a)

Answer
Example solution:

Marks
7

PROCEDURE CountLoans(ThisStudentID : STRING)
DECLARE Index, LCount, RCount : INTEGER
LCount  0
RCount  0
FOR Index  1 TO 7000
IF Loan[Index].StudentID
IF Loan[Index].OnLoan
RCount  RCount +
ELSE
LCount  LCount +
ENDIF
ENDIF
NEXT Index

= ThisStudentID THEN
= FALSE THEN
1
1

OUTPUT "Student has ", LCount, " books on loan"
OUTPUT "and has returned ", RCount, " books"
ENDPROCEDURE
Mark as follows:
MP1
Declaration of Index and two count variables
MP2
Loop for 7000 iterations
MP3
Index references an indexed data item with correct .dot notation
MP4
Attempt to compare the StudentID field = parameter in a loop
MP5
Test of the OnLoan field and correct logic for both outcomes
MP6
Both count variables initialised and increment appropriate count in a
loop
MP7
Output includes both counts with a suitable message

© Cambridge University Press & Assessment 2025

2025

Page 13 of 15

October/November
www.dynamicpapers.com

9618/22

Cambridge International AS & A Level – Mark Scheme
PUBLISHED

Question
8(b)

Answer
Example solution:

Index  1
IsStored  FALSE
WHILE Index <= 7000 AND NOT
IF Loan[Index].StudentID
Loan[Index].StudentID
Loan[Index].BookID 
Loan[Index].OnLoan 
IsStored  TRUE
ENDIF
Index  Index + 1
ENDWHILE

IsStored
= Blank THEN
 ThisStudentID
ThisBookID
TRUE

RETURN IsStored
ENDFUNCTION
Mark as follows:

MP3
MP4
MP5
MP6
MP7

Loop through 7000 elements in Loan array – correct loop structure
or until the first unused element is found // Correct RETURN inside a
FOR loop
Correct use of the indexed dot notation
Test if record is unused (.StudentID = "")in a loop
Two item assignment statements correct
Loan[Index].OnLoan assigned TRUE
Correct logic to return BOOLEAN in both cases (position found / no
position available)

Alternative solution: loop only (no ‘found’ mechanism)
FOR Index  1 TO 7000
IF Loan[Index].StudentID
Loan[Index].StudentID
Loan[Index].BookID 
Loan[Index].OnLoan 
RETURN TRUE
ENDIF
NEXT
RETURN FALSE

© Cambridge University Press & Assessment 2025

Marks
7

FUNCTION NewLoan(ThisStudentID, ThisBookID : STRING) __
RETURNS
BOOLEAN
DECLARE Index : INTEGER
DECLARE IsStored : BOOLEAN
CONSTANT Blank = ""

MP1
MP2

2025

= Blank THEN
 ThisStudentID
ThisBookID
TRUE

Page 14 of 15

October/November
www.dynamicpapers.com

9618/22

Cambridge International AS & A Level – Mark Scheme
PUBLISHED

Question

Answer

8(c)

MP1
MP2

Save to/Open a (text) file
Single line – form a string with separator characters and write to the
file // Multiple lines - write each data item to a separate line in the
file

8(d)

Additional date(s) solution
MP1
Store the return date of each loan // the start date and the loan
period
MP2
Algorithm will do a calculation involving the MP1 data item(s)
OR
The student email address solution
MP3
Store the student email address
MP4
In order to send the email // the student is alerted to return the book
Max 2

© Cambridge University Press & Assessment 2025

Page 15 of 15

2025

Marks
2

2

Advertisement