Computer Science · June 2021 · Mark scheme · Paper 2B

Edexcel International GCSE Computer Science mark scheme for Paper 2B, June 2021 — 4CP0/2B, file 4CP0_2B_rms_20210604.pdf.

Advertisement
Loading the paper…
Text of this paper

Mark Scheme (Results)
Summer 2021
Pearson Edexcel International GCSE
in Computer Science (4CP0_2B)
Paper 02: Application of Computational
Thinking - C#

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 2021

Question Paper Log Number P66490A
Publications Code 4CP0_2B_2106_MS

All the material in this publication is copyright
© Pearson Education Ltd 2021

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.

Theory Mark Scheme
Question
1 (a)

mp
A1

Answer
1. The only correct answer is B

Additional Guidance

Mark

A is not correct because as it is an arithmetic operator
C is not correct because as it is a relational operator
D is not correct because as it is a relational operator
Question
1 (b)

mp
B1
B2

Answer
Award up to 2 marks for a linked description such as:
•
•
•
•

Question
2 (c)

Additional Guidance
Accept an interpretation

1D represents items as a list (1), 2D as a table / 2D as rows and columns (1)
1D is a row/column (1), 2D is a table / 2D has rows and columns (1)
Each element in 1D is a single value (1), each element in 2D is a 1D array (1)
1D array can only store one type of element (1). 2D array can store multiple
elements in it (1)

mp Answer
Award 1 mark for each set of test data.
C1
C2
C3

(1)

booksSold
profit
booksSold
profit
booksSold
profit

Test data
Either of
• booksSold = 4
• profit = 4
5
10
21
20

Mark

(2)
Additional Guidance

Mark

Expected results
Poor performances this week
Sales and profit are good this week
Sales and profit are excellent this week

(3)

Question
3 (b)

mp
B1

Answer
Award up to 2 marks for a linked explanation such as:
•
•

Question
3 (c)

mp

The number of keys are limited/only one shift used (1) making it easy to use brute
force to decrypt (1)
It can be easy to find commonly used letters (e.g. E) (1) and guess the key (1)

Answer
Award 1 mark each up to a maximum of 4 for:
Encrypted letter
Keyword letter

Decrypted letter
C1

C2
C3
C4

f

t

m

l

m

k

t

e

e

t

a

h

i

r

t

Award 1 mark from:
• flmktrwhee mapped to thirtythir (1)
• Flmktr mapped to thirty (1)
At least one letter decrypted correctly (1)
At least one word decrypted correctly (1)
Decrypted message ‘meet at dawn’ (1)

w

h

e

e

t

d

a

w

n

t

h

i

Mark

(2)
Additional Guidance

r

y

Additional Guidance
Accept alternative similar
wording.

Mark

r

(4)

Question
3 (d)(i)
3 (d)(ii)

3 (d)(iii)

mp
D1

D2

D2

Answer
Award 1 mark for:
• cipherLetter / a single encrypted letter (1)
Award 1 mark for any of:
• keywordLetter
• plaintextLetter
Award 1 mark for any of:
•
•
•
•

subprogram that is already defined
subprogram that is already written
subprogram that is already compiled
subprogram that can be called without having to write code for it

Additional Guidance
Do not accept
word/message/text
Ignore case

Must be clear they are
referring to subprogram
provided by the language
itself

Mark
(1)

(1)

(1)

Question
4 (b)(i)

4 (b)(ii)

4 (b)(iii)
4 (b)(iv)

mp

Answer
Award up to 2 marks for a linked explanation:
• binary search can be quicker / is more effective than a linear
search / is more effective with larger lists (1) as it does not have
to examine each item in the list (1)
• binary search halves the list each time (1) so it can be faster to
find an item (1)
• binary search requires fewer comparisons than a linear search
to establish an item is not in the list (1) because the linear list
would need to compare each item before establishing this (1)
Correct answer
Position in list
Product code
Order examined
1
ark11
2
asp11
3
bar13
4
dri15
1
5
mil19
6
rib10
2
7
str15
3
8
tor16
B1

Award one mark for each correct value in order column
B1
Start of search correct
B2
Second search item correct
B3
Third search item correct
B4
All correct
B5
Award 1 mark for:
3 or log2 n + 1
B6
Award 1 mark for any of:
•
•

bubble sort
merge sort

Additional Guidance

Mark

(2)

Accept 5 and 7 for B1 and B2 (2 marks)
Follow through if start of search incorrect
Follow through if start of search incorrect

Accept any known sorting algorithm

(4)

(1)

(1)

C# Code Mark Scheme
Question
1 (c)

mp
C1
C2
C3

Question

mp

1 (d)(i)

D1

1 (d)(ii)

D2

1 (d)(iii)

D3

1 (d)(iv)

D4

Answer
Change num_twenties == to num_twenties = (1)
The left over variable named the same in both places (1)

Additional Guidance

Change , to +
Answer
Award 1 mark for adding an appropriate comment at the end of the line where there is relational
operator:
Award one mark for adding an appropriate comment at the end of a line where iteration starts:

Award one mark for adding an appropriate comment at the end of the line where selection starts:
Award one mark for adding an appropriate comment at the end of a line where a data structure is
initialised:

Mark

(3)
Additional
Guidance
May be on different
line numbers

Mark

The comment(s)
added must clearly
identify the
component

(1)

(1)
(1)

(1)

Question
2 (a)

mp Answer
Award one mark for each of:
A1
At least one variable with a suitable variable name
A2
username = bard423
A3
password = nX2934? OR nX2934
A4
Loop used
A5
Username or password entered
A6
Username or password stored in variable(s)
A7
At least one suitable input message
A8
Checks username and password
A9
Appropriate error message(s) displays
A10
Welcome message displayed
A11
Executing and producing correct output
Code examples
C#

Additional Guidance
Logic of algorithm must be followed as set out.

Mark

Alternatives must address each point.
Do not penalise candidates who attempt more than the
stated requirements.
Do not penalise spelling mistakes in the assignment of
username and/or password
Do not penalise spelling mistakes and alternative wording
of the output.

(11)

Question
2 (b)

mp Answer
Award 1 mark for each correct condition.
Condition
B1
Number of books sold is under 5 or profit
made is under 5

Output message
Poor performance this week

B2

Number of books sold is over 20; profit
made is at least 20

Sales and profit are excellent this week

B3

Number of books sold is at least 5; profit
made is at least 10

Sales and profit are good this week

B4

All other inputs

Alert manager

Code examples
C#

Additional Guidance
Alternative alternatives
e.g. Line 11 booksSold
<=4 etc.

Mark

(4)

Question
3 (a)

mp
A1
A2
A3
A4
A5
A6
A7
A7

Code examples
C#

Answer
Get plaintext and store in plaintext variable
Get key and store in key variable
Validate key
Open file to write
Write cipher text
Close file
Displays ciphertext
Executing and producing correct output to file and screen
(must have A3)

Additional Guidance
Accept alternative wording
Line numbers may be different compared to the
examples shown
When testing the completed code use lowercase
for the input

Mark
(1)
(1)
(1)
(1)
(1)
(1)
(1)
(1)

Question
4 (a)

mp
A1
A2
A3
A4
A5
A6
A7

Code examples
C#

Answer
At least 1 variable has a meaningful name
Product name requested using a suitable input message
Random number generated that would be at least 10 or no higher than 30
Random number generated that would be in the correct range 10 to 30
First 3 letters of product name generated
First 3 letters of product name and random number concatenated to generate
productCode
productCode and productName output in the same print statement

Additional Guidance
Ignore spelling mistakes in
input message

Mark

(7)

For Q5, the first 11 marks are for coding that matches requirements of task. The remaining 9 marks should be allocated on a best fit.
Question
5

mp
A1

A2
A3
A4
A5
A6
A7
A8

Answer

addPlayerName()
Suitable prompt for player name and assigned to suitable
variable
guessCapital()
Ensure question can only be used once
Question includes suitable message and country name
Check made to see if guess is correct
If guess correct score incremented
If guess is incorrect suitable message displayed
If guess incorrect capital concatenated with message
Repeated for a minimum of five questions

Main Program

A9

Player name or score displayed

A10

At least one menuChoice calls correct subprogram
Main program calls the two sub-programs correctly

A11

Additional Guidance

Mark

Do not award if more than one question
variable e.g. question1, question2 etc.

Do not award if questions are asked manually
e.g. question1, question2, repeated code for
each question etc.
Do not award if 5 unique questions are not
asked while the program is running
Do not award if the return value from at least
one function is not used
(11)

Band 1 (1-3 marks)

Band 2 (4-6 marks)

Band 3 (7-9 marks)

Little attempt to decompose into component
parts

Some attempt to decompose into component
parts

The problem has been decomposed into
component parts

Some parts of the logic are clear and
appropriate to the problem

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 enough
with other data sets or input

Finished program will function with 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 meets most of the given
requirements

The program fully meets the given
requirements

Mark

(9)

Code examples
C# Add player name function

Main program

Guess capital city function

Pearson Education Limited. Registered company number 872828

with its registered office at 80 Strand, London, WC2R 0RL, United Kingdom

Advertisement