Computer Science: Pearson Edexcel International GCSE
Computer Science: Pearson Edexcel International GCSE
Please check the examination details below before entering your candidate information
Computer Science
27 – 31 March 2023 Paper Reference
Instructions
• Use black ink or ball-point pen.
• Fill in the boxes at the top of this page with your name.
• Answer all questions.
• Answer the questions requiring a written answer in the spaces provided
– there may be more space than you need.
• Only one programming language (Python, C# and Java) must be used
throughout the test.
• 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 test.
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.
Page 1 of 9
INTERNATIONAL MAKKHAYAR
(2)
0 1 1 1 0 0 1 0
0 0 1 0 0 0 1 1
(2)
………………………………………………………………………………
………………………………………………………………………………
(2)
………………………………………………………………………………
………………………………………………………………………………
(d) Write an arithmetic expression to show that 256 different numbers can be represented in 8
bits.
(2)
………………………………………………………………………………
………………………………………………………………………………
Page 2 of 9
INTERNATIONAL MAKKHAYAR
2. Manuel is working on logic for an exclusive OR operator, often known as XOR. This logical
operator can be implemented using AND, OR, and NOT.
(6)
(a) Complete this truth table to show Q.
0 0
0 1
1 0
1 1
(b) In Shaneela’s program, the days of the week are numbered 1 for Monday, 2 for Tuesday, 3
for Wednesday, 4 for Thursday, 5 for Friday, 6 for Saturday and 7 for Sunday.
She is writing code to determine if a numerical value represents a weekday or weekendday.
Complete the following pseudocode to show the logical operations required to produce the
correct output.
(5)
Page 3 of 9
INTERNATIONAL MAKKHAYAR
3. Ships carry cargo around the world in containers. Containers come in two sizes.
Figure 1 shows an algorithm written using flowchart symbols.
Figure 1
Complete the table to show the output for each cargo item.
(6)
Cargo Item
Output
Width Length Height
4 4 2
2 2 2
3 8 5
Page 4 of 9
INTERNATIONAL MAKKHAYAR
4.(a) Denary numbers use base 10 Identify the base for hexadecimal numbers.
(1)
A. 32
B. 16
C. 8
D. 2
(b) The ASCII system uses 7 bits to represent a character. The ASCII code for the character
‘A’ using denary is 65; other alphabetical characters follow on from this in sequence. Identify
the ASCII code for ‘H’.
(1)
A 1000111
B 1001010
C 1001000
D 1000101
(c) Ask the user to enter the length and width of a rectangle. Your program should calculate
the area of the rectangle (length × width) and display the result with a suitable message.
Open Q04c in the code editor.
Save your amended code as Q04cFINISHED with the correct file extension for the
programming language.
(6)
Page 5 of 9
INTERNATIONAL MAKKHAYAR
Condition Output
Shop income is more than £5000 or sales Bonus is 10% of salary
assistant has sold at least 10 pairs of shoes,
Shop income is £2000 or more and sales Bonus is 5% of salary
assistant has sold at least 5 pairs of shoes,
(d) Give one reason why computer programmers should use comments in their
programs.
(2)
.............................................................................................................................
.............................................................................................................................
Page 6 of 9
INTERNATIONAL MAKKHAYAR
(b) For the following statements, think through the code and write down the exact output
produced. Pay attention to:
■ whether the answer should be written as an integer or float number
■ when the numbers stored in variables are updated.
(3)
numberOne = 5
numberTwo = numberOne * 2
numberThree = numberOne + numberTwo + numberTwo
print(numberOne,numberTwo,numberThree)
_________________________________________________
_________________________________________________
7.(a) Ask the user to enter the base and height of the two triangles. Your program should
calculate the area of two triangles. Once both areas have been calculated your program should
decide which triangle has the larger area and display a suitable message.
Open Q07a in the code editor.
Save your amended code as Q07aFINISHED with the correct file extension for the
programming language.
(18)
Page 7 of 9
INTERNATIONAL MAKKHAYAR
(b) In the following question you will be asked to predict the output from each small program
using a variety of different inputs.
(6)
temp = int(input("Please enter a temperature"))
if temp >= -273 and temp <= 42:
print("Solid")
elif temp >43 and temp < 87:
print("Liquid")
else:
print("Gas")
Output _____________________
Output______________________
Output______________________
(c) Draw a flow chart to read temperature in Fahrenheit and display a suitable message
according to the temperature state below:
(5)
Page 8 of 9
INTERNATIONAL MAKKHAYAR
Page 9 of 9