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)
5–7 June 2019
Time: 3 hours Paper Reference 4CP0/02
Computer Science
Paper 2: Application of Computational Thinking
You must have: A computer workstation with an appropriate programming Total Marks
language code editing software and tools, including a code interpreter/compiler,
CODES folder containing code and data files, pseudocode command set (enclosed)
Instructions
• Use black ink or ball-point pen.
• centrethe
Fill in boxes at the top of this page with your name,
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.
• 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 invigilatorfolder
The CODES in your user area includes all the code and data files you need.
• will tell you where to store your work.
Advice
• Read each question carefully before you start to answer it.
• Save your work regularly.
• your answers if you have time at the end.
Check
Turn over
, 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 Computer programs use several different programming constructs.
(a) Identify the most appropriate data type for the value 4.5
(1)
A Boolean
B Character
C Real
D String
(b) Give a definition of a logic error.
(1)
(c) Open Q01c in the code editor.
The program should print out a counter and the counter with 7 added to it.
There are three errors in the code.
Amend the code to correct the errors.
Save your amended code as Q01cFINISHED with the correct file extension for the
programming language.
(3)
(d) Give one reason why computer programmers should use comments in their
programs.
(1)
(f ) Trevor is the manager of a shoe shop.
Sales assistants can earn a bonus based on the numbers of pairs of shoes they sell
and the total income for the shop each day.
Open Q01f in the code editor.
Amend the code to complete the ‘if statement’ used to produce the outputs
described in the table.
Condition Output
Shop income is more than £5000 or
sales assistant has sold at least Bonus is 10% of salary
10 pairs of shoes
Shop income is £2000 or more and
sales assistant has sold at least Bonus is 5% of salary
5 pairs of shoes
Do not add any further functionality.
Save your amended code as Q01fFINISHED with the correct file extension for the
programming language.
(4)
3
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller muhammadabdullah1. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for £7.49. You're not tied to anything after your purchase.