COMPUTER SCIENCE
Paper 1
Tuesday 12 May 2026 Afternoon Time allowed: 1 hour 45 minutes
Materials
For this paper you must have:
• a computer
• a printer
• appropriate software
• the Electronic Answer Document
• an electronic version and a hard copy of the Skeleton Program
• an electronic version and a hard copy of the Preliminary Material
You must not use a calculator.
Instructions
• Type the information required on the front of your Electronic Answer Document.
• Before the start of the examination make sure your Centre Number, Candidate Name and
Candidate Number are shown clearly in the footer of every page (not the front cover) of your
Electronic Answer Document.
• Enter your answers into the Electronic Answer Document.
• Answer all questions.
• Save your work at regular intervals.
Information
• The marks for questions are shown in brackets.
• The maximum mark for this paper is 75.
• No extra time is allowed for printing and collating.
• The Question Paper is divided into three sections.
Advice
You are advised to allocate time to each section as follows:
Section A – 20 minutes; Section B – 25 minutes; Section C – 60 minutes.
At the end of the examination
Tie together all your printed Electronic Answer Document pages and hand them to the Invigilator.
Warning
It may not be possible to issue a result for this paper if your details are not on every page of your
Electronic Answer Document.
IB/G/Jun26/G4003/V9 7516/1
, 2
Section A
You are advised to spend no more than 20 minutes on this section.
Enter your answers to Section A in your Electronic Answer Document. You must save this
document at regular intervals.
Question 03 in this section asks you to write program code starting from a new
program/project/file.
You are advised to save your program at regular intervals.
0 1 The algorithm, represented using pseudo-code in Figure 1, describes a method to
issue change from a vending machine.
The parameter cost contains the price, in pence, of a purchased item. The
parameter paid contains the amount of money, in pence, inserted into the machine.
Both parameters are integers, and paid will always be greater than or equal
to cost
Coins available are worth 50, 20, 10, 5, 2, and 1 pence.
Figure 1
SUBROUTINE IssueChange(cost, paid)
change paid – cost
coinValues [50, 20, 10, 5, 2, 1]
FOR i 0 TO LEN(coinValues) – 1
IF change ≥ coinValues[i] THEN
change change – coinValues[i]
ReleaseCoin(coinValues[i])
ENDIF
ENDFOR
RETURN Change
ENDSUBROUTINE
The ReleaseCoin subroutine causes the machine to release a coin of the specified
amount.
IB/G/Jun26/7516/1
, 3
0 1 . 1 Complete Table 1 by hand-tracing the algorithm in Figure 1 when the following
statement is executed.
remaining IssueChange(24, 100)
Table 1
change i coinValues[i]
Copy the contents of all the unshaded cells in Table 1 into your Electronic
Answer Document.
[5 marks]
0 1 . 2 If the algorithm returns zero, then all the necessary change has been issued.
Under some circumstances, however, not all necessary change is issued.
Give one example of a call to IssueChange that would result in some of the
necessary change not being issued and explain why this is the case.
In your example, both parameters should be positive integer values less than 100.
[3 marks]
0 2 State two examples of tasks that would be undertaken during the analysis stage of
software development.
[2 marks]
Turn over ►
IB/G/Jun26/7516/1