Pearson Edexcel Level 1/Level 2 GCSE (9–1)
Tuesday 19 May 2026
Afternoon (Time: 2 hours) Paper
reference 1CP2/02
Computer Science
PAPER 2: Application of Computational Thinking
You must have:
• a computer workstation with appropriate programming language code
editing software and tools, including an IDE that you are familiar with
that shows line numbers
• a ‘STUDENT CODING’ folder containing code and data files
• printed and electronic copies of the Program Language Subset (PLS)
document (enclosed).
Instructions
•• Answer all questions on your computer.
Save the new or amended code in the ‘COMPLETED CODING’ folder using the
name given in the question.
•• Do not overwrite the original code and data files provided to you.
You must not use the internet at any time during the examination.
Information
•• The total mark for this paper is 75.
The marks for each question are shown in brackets
– use this as a guide as to how much time to spend on each question.
• The ‘STUDENT CODING’ folder in your user area includes all the code and data files
you need.
Advice
•• Read each question carefully before you start to answer it.
Save your work regularly.
• Check your answers and work if you have time at the end.
Turn over
P79590A
©2026 Pearson Education Ltd.
P:1/1/1/1/1/1/
*P79590A0112*
, Answer ALL questions.
Suggested time: 10 minutes
DO NOT WRITE IN THIS AREA DO NOT WRITE IN THIS AREA DO NOT WRITE IN THIS AREA
1 A program draws a square and a triangle.
Square
• The colour of all the lines is purple.
• All lines are equal width.
• Line width is a random number between 5 and 10.
Triangle
• The colour of each line may be different.
• The colour must be a random selection from an array.
• All lines are equal width.
• Line width is a random number between 5 and 10.
The program has errors.
Here is a greyscale image of the output produced by a fully functional program.
Python Turtle Graphics
2
*P79590A0212*
, Open file Q01.py
Amend the code to:
DO NOT WRITE IN THIS AREA DO NOT WRITE IN THIS AREA DO NOT WRITE IN THIS AREA
• fix the syntax error on original line 5
import ;random
• fix the syntax error on original line 8 by adding a comment symbol
Constants
• fix the syntax error on original line 20
size != 0
• fix the NameError on original line 51
theTurtle.pendown (_WIDTH)
• fix the ValueError on original line 54
index = random.randint (74, len (colours) – 1)
• fix the AttributeError on original line 58
theTurtle.penupp ()
• fix the logic error on original line 37 that causes the pen size to be too big
size = random.randint (MIN_WIDTH, WIDTH)
• fix the logic error on original line 56 that draws the triangle in the wrong direction
theTurtle.backward (100)
• fix the logic error on original line 45 that causes a line to be drawn between the
square and the triangle
theTurtle.pendown ()
Do not change the functionality of the given lines of code.
Do not add any additional functionality.
Save your amended code file as Q01FINISHED.py
(Total for Question 1 = 9 marks)
3
*P79590A0312* Turn over
, Suggested time: 15 minutes
2 A program is required to determine the area of a circle.
DO NOT WRITE IN THIS AREA DO NOT WRITE IN THIS AREA DO NOT WRITE IN THIS AREA
The minimum radius of a circle is 6.
The formula to calculate the area of a circle is:
radius
A=π×r 2
• A is the area of the circle
• π is the constant Pi
• r is the radius of the circle.
Open file Q02.py
Amend the code to:
• add a line to create an integer constant named MIN_RADIUS and set it to 6
• complete the line to calculate the area of the circle. Use the library constant
math.pi. Use exponentiation to raise the variable radius to the power of two
• add a line to return the area of the circle to the main program
• complete the line to take an integer input from the user
• complete the line to check if the radius is too small
• complete the line to use the math.ceil () function to round the area up to
the next whole number
• add a line to display a message and the area of the circle on a single line.
Test the functionality of the program using the data in this table.
Input Output
12 The area of the circle is 453
3 Invalid radius
Use the constant, variables and library provided.
Do not add any additional functionality.
Save your amended code as Q02FINISHED.py
(Total for Question 2 = 10 marks)
4
*P79590A0412*
Tuesday 19 May 2026
Afternoon (Time: 2 hours) Paper
reference 1CP2/02
Computer Science
PAPER 2: Application of Computational Thinking
You must have:
• a computer workstation with appropriate programming language code
editing software and tools, including an IDE that you are familiar with
that shows line numbers
• a ‘STUDENT CODING’ folder containing code and data files
• printed and electronic copies of the Program Language Subset (PLS)
document (enclosed).
Instructions
•• Answer all questions on your computer.
Save the new or amended code in the ‘COMPLETED CODING’ folder using the
name given in the question.
•• Do not overwrite the original code and data files provided to you.
You must not use the internet at any time during the examination.
Information
•• The total mark for this paper is 75.
The marks for each question are shown in brackets
– use this as a guide as to how much time to spend on each question.
• The ‘STUDENT CODING’ folder in your user area includes all the code and data files
you need.
Advice
•• Read each question carefully before you start to answer it.
Save your work regularly.
• Check your answers and work if you have time at the end.
Turn over
P79590A
©2026 Pearson Education Ltd.
P:1/1/1/1/1/1/
*P79590A0112*
, Answer ALL questions.
Suggested time: 10 minutes
DO NOT WRITE IN THIS AREA DO NOT WRITE IN THIS AREA DO NOT WRITE IN THIS AREA
1 A program draws a square and a triangle.
Square
• The colour of all the lines is purple.
• All lines are equal width.
• Line width is a random number between 5 and 10.
Triangle
• The colour of each line may be different.
• The colour must be a random selection from an array.
• All lines are equal width.
• Line width is a random number between 5 and 10.
The program has errors.
Here is a greyscale image of the output produced by a fully functional program.
Python Turtle Graphics
2
*P79590A0212*
, Open file Q01.py
Amend the code to:
DO NOT WRITE IN THIS AREA DO NOT WRITE IN THIS AREA DO NOT WRITE IN THIS AREA
• fix the syntax error on original line 5
import ;random
• fix the syntax error on original line 8 by adding a comment symbol
Constants
• fix the syntax error on original line 20
size != 0
• fix the NameError on original line 51
theTurtle.pendown (_WIDTH)
• fix the ValueError on original line 54
index = random.randint (74, len (colours) – 1)
• fix the AttributeError on original line 58
theTurtle.penupp ()
• fix the logic error on original line 37 that causes the pen size to be too big
size = random.randint (MIN_WIDTH, WIDTH)
• fix the logic error on original line 56 that draws the triangle in the wrong direction
theTurtle.backward (100)
• fix the logic error on original line 45 that causes a line to be drawn between the
square and the triangle
theTurtle.pendown ()
Do not change the functionality of the given lines of code.
Do not add any additional functionality.
Save your amended code file as Q01FINISHED.py
(Total for Question 1 = 9 marks)
3
*P79590A0312* Turn over
, Suggested time: 15 minutes
2 A program is required to determine the area of a circle.
DO NOT WRITE IN THIS AREA DO NOT WRITE IN THIS AREA DO NOT WRITE IN THIS AREA
The minimum radius of a circle is 6.
The formula to calculate the area of a circle is:
radius
A=π×r 2
• A is the area of the circle
• π is the constant Pi
• r is the radius of the circle.
Open file Q02.py
Amend the code to:
• add a line to create an integer constant named MIN_RADIUS and set it to 6
• complete the line to calculate the area of the circle. Use the library constant
math.pi. Use exponentiation to raise the variable radius to the power of two
• add a line to return the area of the circle to the main program
• complete the line to take an integer input from the user
• complete the line to check if the radius is too small
• complete the line to use the math.ceil () function to round the area up to
the next whole number
• add a line to display a message and the area of the circle on a single line.
Test the functionality of the program using the data in this table.
Input Output
12 The area of the circle is 453
3 Invalid radius
Use the constant, variables and library provided.
Do not add any additional functionality.
Save your amended code as Q02FINISHED.py
(Total for Question 2 = 10 marks)
4
*P79590A0412*