Please check the examination details below before entering your candidate information
Candidate surname Other names
Centre Number Candidate Number
Pearson Edexcel International GCSE (9–1)
Monday 5 – Wednesday 7 June 2024
Time 3 hours Paper
reference 4CP0/02
Computer Science
PAPER 2: Application of Computational Thinking
You must have: A computer workstation with appropriate Total Marks
programming language code editing software and tools, including a
code interpreter/compiler, CODES folder containing code and data files,
and pseudocode command set (enclosed)
Instructions
•• Use black ink or ball‑point pen.
Fill in the boxes at the top of this page with your name,
centre number and candidate number.
•• Answer all questions.
Answer the questions requiring a written answer in the spaces provided
– there may be more space than you need.
• examination.
Only one programming language (Python, C# or Java) must be used throughout the
• Carry out practical tasks on the computer system and save new or amended code
using the name given in the question with the appropriate file extension.
•• Do not overwrite the original code and data files provided to you.
You must not use the internet during the examination.
Information
•• The total mark for this paper is 80.
The marks for each question are shown in brackets
– use this as a guide as to how much time to spend on each question.
•• This paper covers Python, C# and Java.
The CODES folder in your user area includes all the code and data files you need.
• The invigilator will tell you where to store your work.
Advice
•• Read each question carefully before you start to answer it.
Save your work regularly.
• Check your answers if you have time at the end. Turn over
P72938A
N:1/1/1/1/1/E2/1/
*P72938A0116*
, PMT
Answer all questions.
Answer the questions requiring a written answer in the spaces provided.
Some questions must be answered with a cross in a box . If you change your mind about an
answer, put a line through the box and then mark your new answer with a cross .
Carry out practical tasks on the computer system and save new or amended code using the
name given with the appropriate file extension.
Use only ONE programming language throughout the examination.
Indicate the programming language that you are using with a cross in a box .
C# Java Python
1 Programs are used to handle financial transactions.
(a) Monthly account statements are created by a program.
Figure 1 shows a statement.
Date Description Debit (£) Credit (£) Balance (£)
01 Jan Opening balance 128.35
04 Jan Music store 10.23 118.12
07 Jan Salary 1,515.28 1,633.40
11 Jan Electricity company 50.00 1,583.40
19 Jan Uniform shop 12.56 1,570.84
27 Jan Refund 25.00 1,595.84
29 Jan Rent 750.00 845.84
31 Jan Interest 0.25 846.09
Figure 1
Complete the table to identify an input, an output and a process used by the
program to generate the furthest right column.
(3)
Input
Processing
Output
2
*P72938A0216*
, PMT
(b) A tax rate is applied to a gross value to give a net value.
Open Q01b in the code editor.
Use the code to answer these questions.
(i) Give the contents of a comment.
(1)
. . . . . . . . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................ ............................................................................................................................ ................ . . . . . . . . . . . . . . . . . . . .
(ii) Identify a logical operator used in this program.
(1)
. . . . . . . . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................ ............................................................................................................................ ................ . . . . . . . . . . . . . . . . . . . .
(iii) Give the name of a global variable.
(1)
. . . . . . . . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................ ............................................................................................................................ ................ . . . . . . . . . . . . . . . . . . . .
(iv) Give the name of a constant.
(1)
. . . . . . . . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................ ............................................................................................................................ ................ . . . . . . . . . . . . . . . . . . . .
(v) Give the name of a parameter.
(1)
. . . . . . . . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................ ............................................................................................................................ ................ . . . . . . . . . . . . . . . . . . . .
(c) Variables and constants are used in program code.
(i) State the purpose of a constant.
(1)
. . . . . . . . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................ ............................................................................................................................ ................ . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................ ............................................................................................................................ ................ . . . . . . . . . . . . . . . . . . . .
(ii) Give one benefit of using a constant.
(1)
. . . . . . . . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................ ............................................................................................................................ ................ . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................ ............................................................................................................................ ................ . . . . . . . . . . . . . . . . . . . .
(Total for Question 1 = 10 marks)
3
*P72938A0316* Turn over