Specimen Assessment Material for first teaching
September 2020
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
which shows line numbers
• a ‘STUDENT CODING’ folder containing code and data files
• printed and electronic copies of the Programming Language Subset (PLS)
document.
Instructions
• Answer all the questions on your computer.
• ‘COMPLETED
Save 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.
• Check yourwork
Save your regularly.
• answers and work if you have time at the end.
Turn over
*S70459A0108*
S70459A
©2021 Pearson Education Ltd.
1/1/1/
, Answer ALL questions.
Suggested time: 15 minutes
1 A program must calculate the circumference of a circle. The user enters the radius of
the circle. A radius of zero or less is invalid.
The formula to calculate the circumference of a circle is:
circumference = 2πr
• π is the constant Pi
• r is the radius.
Open file Q01.py
Amend the code to add or complete lines to:
• import the math library
• create two variables
• take input from the user
• check for an invalid input of zero or less
• display a message to tell the user the input is invalid
• calculate the circumference
• round the circumference to three decimal places using the round() function.
Do not add any additional functionality.
Save your amended code file as Q01FINISHED.py
(Total for Question 1 = 10 marks)
2