100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Computer Science Paper 2 (2019)

Rating
-
Sold
-
Pages
16
Grade
A+
Uploaded on
27-07-2022
Written in
2021/2022

Computer Science Paper 2 (2019) Question Paper

Institution
Course










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Study
Course

Document information

Uploaded on
July 27, 2022
Number of pages
16
Written in
2021/2022
Type
Exam (elaborations)
Contains
Answers

Subjects

Content preview

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



*P61881RA0116*
P61881RA
©2019 Pearson Education Ltd.

1/1/1/1/1

, 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)

................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ........................................................................................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .



................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ........................................................................................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .



2

, (e) Describe the difference between a local variable and a global variable in
a computer program.
(2)

................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .



................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .



................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .



................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


(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
$10.35
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
muhammadabdullah1

Get to know the seller

Seller avatar
muhammadabdullah1 Pearson College (London)
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
3 year
Number of followers
0
Documents
5
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions