Computer Science · June 2019 · Mark scheme · Paper 2
Edexcel International GCSE Computer Science mark scheme for Paper 2, June 2019 — 4CP0/02, file 4CP0_02_msc_20190822.pdf.
Text of this paper
Mark Scheme (Results)
Summer 2019
Pearson Edexcel International GCSE
In Computer Science (4CP0)
Paper 02: Application of Computational Thinking
Edexcel and BTEC Qualifications
Edexcel and BTEC qualifications are awarded by Pearson, the UK’s largest awarding body. We
provide a wide range of qualifications including academic, vocational, occupational and specific
programmes for employers. For further information visit our qualifications websites at
www.edexcel.com or www.btec.co.uk. Alternatively, you can get in touch with us using the details
on our contact us page at www.edexcel.com/contactus.
Pearson: helping people progress, everywhere
Pearson aspires to be the world’s leading learning company. Our aim is to help everyone progress
in their lives through education. We believe in every kind of learning, for all kinds of people,
wherever they are in the world. We’ve been involved in education for over 150 years, and by
working across 70 countries, in 100 languages, we have built an international reputation for our
commitment to high standards and raising achievement through innovation in education. Find out
more about how we can help you and your students at: www.pearson.com/uk
Summer 2019
Publications Code 4CP0_02_1906_MS
All the material in this publication is copyright
© Pearson Education Ltd 2019
General Marking Guidance
•
All candidates must receive the same treatment. Examiners must mark the first
candidate in exactly the same way as they mark the last.
•
Mark schemes should be applied positively. Candidates must be rewarded for what
they have shown they can do rather than penalised for omissions.
•
Examiners should mark according to the mark scheme not according to their
perception of where the grade boundaries may lie.
•
There is no ceiling on achievement. All marks on the mark scheme should be used
appropriately.
•
All the marks on the mark scheme are designed to be awarded. Examiners should
always award full marks if deserved, i.e. if the answer matches the mark
scheme. Examiners should also be prepared to award zero marks if the candidate’s
response is not worthy of credit according to the mark scheme.
•
Where some judgement is required, mark schemes will provide the principles by which
marks will be awarded and exemplification may be limited.
•
When examiners are in doubt regarding the application of the mark scheme to a
candidate’s response, the team leader must be consulted.
•
Crossed out work should be marked UNLESS the candidate has replaced it with an
alternative response.
This mark scheme is presented so that questions requiring a handwritten response are grouped at the start.
This is followed by the mark scheme for the questions which require submission of coding.
Examples of coding that would gain marks is grouped at the end in order of coding language.
Question Answer
1(a)
The only correct answer is C
Additional Guidance
Mark
A is not correct because Boolean only has values True and
False
B is not correct because it only allows for one character
D is not correct because it is used for mixed text and numeric
data
1(b)
1(d)
1(e)
(an error that) produces incorrect /unintended output (1)
Any one from:
1. explain how the program works (1)
2. improve readability of the program (1)
3. make code more understandable (1)
1. Global variables created in the main program / can be
accessed from any part of the program / are in scope
throughout the program (1)
2. Local variables are declared/created inside a
function/blocked code (indented, brackets) and are only
accessible there / are only in scope within the function in
which they’re declared (1)
Accept an example of an explained logic error
(1)
(1)
(1)
(2)
Question Answer
1(g)
For up to two tests
Award 1 mark for an appropriate validation test and 1 mark
for an item of test data that would fail only the given test
Validation test
Are the first two
characters letters/upper
case letters?
Are the third- and fourthcharacters numerical
digits?
Are the last three
characters letters/upper
case letters?
Erroneous data
1234CCC
Additional Guidance
Each test should target a different feature of one of the
requirements
• Exactly 7 characters (in the stem)
• First two characters are letters / upper case
letters
• Characters 3 & 4 are numeric
• Last three characters are letters / upper case
letters
Mark
CCCCBBB
CC12345
(4)
Question Answer
2(b)(i)
24.0 (1)
2(b)(ii)
Additional Guidance
Accept 24
Mark
(1)
One of:
By the rules of precedence multiplication is done before
addition. (1)
Without the brackets the addition would be done to the total
of the multiplication. (1)
By the rules of the BODMAS/BIDMAS additions happen after
multiplication. (1)
newSpeed and intialSpeed have to be added together before
multiplying (by time). (1)
(1)
Question Answer
2(b)(iii)
Real (1)
Because real x integer = real (1)
2(b)(iv)
Additional Guidance
Accept double / float
Accept ‘because it could be a number with decimal
places’
27.375 (1)
Mark
(2)
(1)
Q2(c)(i)
C#:
Java:
Python:
16 or 20 (1)
16 or 21 (1)
8 or 10 (1)
C#:
Java:
Python:
29 or 31 (1)
24 or 26 (1)
14 or 15 (1)
(1)
Q2(c)(ii)
Q2(c)(iii)
Q2(c)(iv)
Q2(c)(v)
Q2(c)(vi)
Any of:
1. Message (1)
2. startPos (Python) / pos (Java or C#) (1)
3. characters (1)
newMessage (1)
Response starts with ‘c’ (1)
Response has six letters in sequence from ‘educational’ (1)
1. Returns substring / crops a string (1)
2. Located between the two input values / with number of
characters identified in the last parameter (characters)
and starting at the second parameter (startPos) (1)
(1)
Do not accept outMessage
Marks can be awarded from Q2(c)(vi)
(1)
(1)
(2)
Award two marks for:
It produces a substring of the message starting at
position startPos with length characters
Award up to 2 marks for a correct interpretation of the
code (e.g ‘obtain a newMessage’ – is worth 1)
Accept a correct generic explanation of what a
subprogram does for 1 mark
(2)
Question Answer
Q3(b)
More memory/storage required (1)
Because not sorted in place / not efficient / many steps /
division of data set / is recursive (1)
Additional Guidance
Question Answer
4(a)
The only correct answer is D
Additional Guidance
4(b)
(2)
A is not correct because Plaintext is the original unencrypted
text
B is not correct because there is a consistency in the coding of
the text
C is not correct because a shift encryption replaces letters
with other letters a given distance from the original letter (as
in a Caesar cipher)
Award 3 marks for all rows correct
Award 2 marks for 4 rows correct
Award 1 mark for 2 rows correct
One mark for correct decision:
Yes (1)
Up to two marks for the correct justifications:
Each/every letter has a symbol / is represented (1)
The symbol is a single/unique representation (1)
Mark
1
G
Q
I
X
N
U
Q4(c)
Mark
(3)
Award marks independently
(3)
Question Answer
1(c)
C#
1. Semicolon at the end of line 9 [maxValue=5;] (1)
2. Consistent capitalisation of ‘count’ on lines 10, 11, 13 and 14 (1)
3. constantValue needs to be defined and given the value 7 /
replaced by value 7 (1)
Java
1. Semicolon at the end of line 8 [maxValue = 5;] (1)
2. Consistent capitalisation of ‘count’ on lines 7, 9, 11 and 12 (1)
3. constantValue needs to be defined and given the value 7 /
replaced by 7 (1)
Python
1. Colon needed at end of line 7 [count, maxValue):] (1)
2. Consistent capitalisation of ‘count’ on line 3, 7, 8 and 9 (1)
3. constantValue needs to be defined and given the value 7 /
replaced by 7 (1)
Additional Guidance
Candidates are required to open the file Q01c in
the code editor.
Amended code should be saved as
Q01cFINISHED.
Line numbers may have been changed by
corrections to code (e.g. insertion of
constantValue definition)
Question Answer
1(f)
Award 1 mark for each correct pair of relational operators and 1 mark for correct
Boolean operator for each condition.
Condition
Shop income more than £5000
or assistant sold at least 10 pairs
Shop income at least £2000 and
assistant sold at least 5 pairs
Coding
shopIncome > 5000; assistantSales >= 10 (1)
correct OR operator (1)
shopIncome >= 2000; assistantSales >= 5 (1)
correct AND operator (1)
Accept >9, >1999 and >4 for respective >= comparisons
Additional Guidance
Candidates are required to open
the file Q01f in the code editor.
Amended code should be saved as
Q01fFINISHED.
Do not penalise candidates who
attempt more than the stated
requirements.
Do not award Boolean operator
mark for single | or & as these are
not correct.
Mark
(3)
Mark
(4)
Question
2(a)
Answer
Award 1 mark for each of:
1. set counter to 1 and guess to 0 (1)
2. set answer to random value between 1 and 10 (1)
3. request input of and accept an integer value for guess (1)
4. create a while loop with a correct condition (1)
5. increment the counter (1)
6. use if else selection to determine and display appropriate
output message for incorrect guesses (1)
7. request input of and accept another integer value for a
guess inside the loop (1)
8. display correct guess and count of guesses (1)
9. compiling without syntax errors (1)
10. coding meets all requirements of question (1)
Question Answer
Q3(a)
Award 1 mark each for:
1. File opened for input (1)
2. File opened for output (1)
3. Loop for processing data (1)
4. Check for ‘@’ symbol (1)
5. Write invalid address to output file (1)
6. Close files (1)
Additional Guidance
Candidates are required to open the file Q02a in the
code editor.
Amended code should be saved as Q02aFINISHED.
Logic of algorithm must be followed as set out.
Alternatives must address each point.
Do not penalise candidates who attempt more than
the stated requirements.
Mark
(10)
Additional Guidance
Amended code should be saved as Q03aFINISHED.
Do not penalise candidates who attempt more than
the stated requirements.
Mark
(6)
Question Answer
Q3(c)
Award 1 mark for each section of code that:
1. Asks for input of a number and stores it in a variable
with a meaningful name (1)
2. Checks number is between 1 and 50 (1)
3. Calculates square and cube of number (1)
4. Displays suitable labels e.g. ‘Number’, ‘Square’ and
‘Cube’ and relevant values (1)
For the whole code:
5. Compiles and runs without logical or syntax errors (1)
6. Efficient in terms of computation, storage and selection
of programming constructs (1)
Additional Guidance
Amended code should be saved as Q03cFINISHED.
Mark
Allow follow through for mark point 4 when square and
cube are incorrectly calculated.
Credit alternative coding which produces same results.
Accept use of exponent operators:
C#
e.g. Math.Pow (2, 3) = 8
Java
e.g. Math.pow (2, 3) = 8
Python
e.g. 2**3 = 8.
(6)
Question Designated marks:
Q5
Designated marks:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Initialise variables for at least two of total number of books, count of pupils and average
Initialise variables for gold, silver and bronze / sort array in order of books read
Create loop for identifying (and printing) those borrowing fewer than 10 books
Print out appropriate details (must include pupil ID)
Print out total of books borrowed
Print out average number of books borrowed
Identification of gold medal winner
Identification of silver medal winner
Identification of bronze medal winner
Details of at least one of gold, silver and bronze medal winner printed (minimum last
name or first name)
11. Details of all three medal winners (first name and last name)
Additional Guidance
Award marks
independently
Mark
Award marks for
reasonable attempt to
meet requirement.
(11)
Question 5 Overview marks:
Mark Band 0
Mark Band 1
0
1–3
No
Little attempt to decompose the
rewardable
problem into component parts
content
Some parts of the logic are clear and
appropriate to the problem
Mark Band 2
4–6
Some attempt to decompose the
problem into component parts
Mark Band 3
7–9
The problem has been decomposed
into component parts
Most parts of the logic are clear and
mostly appropriate to the problem
The logic is clear and appropriate to
the problem
Some appropriate use and
manipulation of data types,
variables, data structures and
program constructs
The use and manipulation of data
types, variables and data structures
and program constructs is mostly
appropriate
The use and manipulation of data
types, variables and data structures
and program constructs is
appropriate
Parts of the code are clear and
readable
Code is mostly clear and readable
Code is clear and readable
Finished program will not be flexible Finished program will function with
enough with other data sets or input some but not all other data sets or
input
Finished program could be used
with other data sets or input
The program meets some of the
given requirements
The program fully meets the given
requirements
The program meets most of the
given requirements
Marks
(9)
C# Example code
1(c)
1(f)
2(a)
3(a)
3(c)
Note: Line 19 is an alternative response to line 18
5
Java Example code
1(c)
1(f)
2(a)
3(a)
3(c)
Note: Line 19 is an alternative response to line 18
5
Python Example code
1(c)
1(f)
2(a)
3(a)
3(c)
Note: Line 11 is an alternative response to line 9.
5
Pearson Education Limited. Registered company number 872828
with its registered office at 80 Strand, London, WC2R 0RL, United Kingdom