e
nc
ie
Sc
er
Pearson Edexcel Level 1/Level 2 GCSE (9–1)
ut
mp
Co
Paper
Time 2 hours
1CP2/02
SE
reference
GC
l
Computer Science
22 ce
20 dex
PAPER 2: Application of Computational Thinking
E
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.
Instructions
• Answer all questions on your computer.
• ‘COMPLETED
Save the new or amended code using the file name provided and place it in the
CODING’ folder.
• You must not use the internet at any time during the examination.
Information
• The ‘STUDENT CODING’ folder in your user area includes all the code and data
files you need.
• The total mark for this paper is 75.
• The marks for each question are shown in brackets.
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
*P71103A0108*
P71103A
©2022 Pearson Education Ltd.
Q:1/1/1/1/
, e
nc
ie
Sc
er
Answer ALL questions.
ut
mp
Co
Suggested time: 15 minutes
SE
1 A program is required to convert numbers entered by the user to their alphabetic
GC
equivalent. Only numbers from 5 to 30 are valid.
l
22 ce
20 dex
Adding 60 to the number and then applying the function chr() generates the
E
equivalent ASCII code for an uppercase letter.
The table shows accurate test data for a functional program.
Input Output
4 Invalid input
5 5 is equal to A
22 22 is equal to R
30 30 is equal to Z
31 Invalid input
Open file Q01.py
Amend the code to:
• create an integer variable named num and set it to 0
• take the input from the user and convert it to an integer
• check that the inputted number is between 5 and 30
• add 60 to the variable num and assign the result to the variable decimalCode
• join strings together with concatenation
• display an error message.
Do not add any additional functionality.
Save your amended code file as Q01FINISHED.py
(Total for Question 1 = 10 marks)
2
*P71103A0208*
, e
nc
ie
Sc
er
Suggested time: 15 minutes
ut
mp
Co
2 A program uses turtle graphics to draw a simple
image. This is the image that must be produced.
SE
GC
Both the circle and the outside square are centred
l
22 ce
on the horizontal and vertical grid lines. The outside
20 dex
square is 400 × 400. The circle is 200 across. The circle
E
outline is coloured gold. All other lines are black.
The program has errors and does not work correctly.
Open file Q02.py
Amend the code to:
• add a comment to identify the data type of the argument to the
turtle.mode () subprogram call on original line 19
turtle.mode ("standard")
• fix the NameError on original line 23
screen.setup (WIDTH, HIGHT)
• fix the AttributeError on original line 28
theTurtle = turtle.turtle ()
• fix the TypeError on original line 36
theTurtle.pendown (200)
• fix the logic error that causes the vertical axis to be too far right on
original line 42
theTurtle.setpos (100, 200)
• fix the logic error that causes the vertical axis to be drawn too short on
original line 48
theTurtle.forward (100)
• fix the logic error that causes the outside square to tilt left of the vertical axis
on original line 56
theTurtle.setheading (95)
• add a line to set the size of the pen to the constant BIG on original line 68
• add a line to set the colour of the pen to gold on original line 71
• add a line to hide the turtle on original line 78.
Do not change the functionality of the given lines of code.
Do not add any additional functionality.
Save your amended code file as Q02FINISHED.py
(Total for Question 2 = 10 marks)
*P71103A0308*
3
Turn over
nc
ie
Sc
er
Pearson Edexcel Level 1/Level 2 GCSE (9–1)
ut
mp
Co
Paper
Time 2 hours
1CP2/02
SE
reference
GC
l
Computer Science
22 ce
20 dex
PAPER 2: Application of Computational Thinking
E
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.
Instructions
• Answer all questions on your computer.
• ‘COMPLETED
Save the new or amended code using the file name provided and place it in the
CODING’ folder.
• You must not use the internet at any time during the examination.
Information
• The ‘STUDENT CODING’ folder in your user area includes all the code and data
files you need.
• The total mark for this paper is 75.
• The marks for each question are shown in brackets.
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
*P71103A0108*
P71103A
©2022 Pearson Education Ltd.
Q:1/1/1/1/
, e
nc
ie
Sc
er
Answer ALL questions.
ut
mp
Co
Suggested time: 15 minutes
SE
1 A program is required to convert numbers entered by the user to their alphabetic
GC
equivalent. Only numbers from 5 to 30 are valid.
l
22 ce
20 dex
Adding 60 to the number and then applying the function chr() generates the
E
equivalent ASCII code for an uppercase letter.
The table shows accurate test data for a functional program.
Input Output
4 Invalid input
5 5 is equal to A
22 22 is equal to R
30 30 is equal to Z
31 Invalid input
Open file Q01.py
Amend the code to:
• create an integer variable named num and set it to 0
• take the input from the user and convert it to an integer
• check that the inputted number is between 5 and 30
• add 60 to the variable num and assign the result to the variable decimalCode
• join strings together with concatenation
• display an error message.
Do not add any additional functionality.
Save your amended code file as Q01FINISHED.py
(Total for Question 1 = 10 marks)
2
*P71103A0208*
, e
nc
ie
Sc
er
Suggested time: 15 minutes
ut
mp
Co
2 A program uses turtle graphics to draw a simple
image. This is the image that must be produced.
SE
GC
Both the circle and the outside square are centred
l
22 ce
on the horizontal and vertical grid lines. The outside
20 dex
square is 400 × 400. The circle is 200 across. The circle
E
outline is coloured gold. All other lines are black.
The program has errors and does not work correctly.
Open file Q02.py
Amend the code to:
• add a comment to identify the data type of the argument to the
turtle.mode () subprogram call on original line 19
turtle.mode ("standard")
• fix the NameError on original line 23
screen.setup (WIDTH, HIGHT)
• fix the AttributeError on original line 28
theTurtle = turtle.turtle ()
• fix the TypeError on original line 36
theTurtle.pendown (200)
• fix the logic error that causes the vertical axis to be too far right on
original line 42
theTurtle.setpos (100, 200)
• fix the logic error that causes the vertical axis to be drawn too short on
original line 48
theTurtle.forward (100)
• fix the logic error that causes the outside square to tilt left of the vertical axis
on original line 56
theTurtle.setheading (95)
• add a line to set the size of the pen to the constant BIG on original line 68
• add a line to set the colour of the pen to gold on original line 71
• add a line to hide the turtle on original line 78.
Do not change the functionality of the given lines of code.
Do not add any additional functionality.
Save your amended code file as Q02FINISHED.py
(Total for Question 2 = 10 marks)
*P71103A0308*
3
Turn over