1cp2 02 Rms 20240822

Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

Mark Scheme (Results)

Summer 2024

Pearson Edexcel GCSE In


Computer Science (1CP2/02)
Paper 2: 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 2024
Question Paper Log Number P75441
Publications Code 1CP2_02_2406_MS
All the material in this publication is copyright
© Pearson Education Ltd 2024
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.
2406 1CP2 02 Mark Scheme

Questio Mark
Appx.
n MP Answer Additional guidance
Line
number
1 Award marks as shown.
1.1 5 Remove double quote from list of integers (1) … 577, 597, 622]

1.2 6 Capitalise false to make it a keyword (1) found = False


● 0
1.3 8 Change 0123 to any integer value (1)
● Allow any numeric value
1.4 15 Add closing bracket for integer conversion (1) index = int (input ("Enter an index:"))
1.5 21 Correct ‘color’ to ‘colour’ (1) colour = rainbow[index]
print (colour)
Correct type conversion attempting to print an int() print ((colour))
1.6 22 to convert to string (1) print (str (colour))
● Allow any method
if ((wavelength < 380) or
1.7 26 Correct ‘and’ to ‘or’ (1)
(wavelength > 622)):
1.8 29 Correct 1 to 0 (1) index = 0
elif (waveTable[index] > wavelength):
● Allow >=
1.9 35 Correct <= to > (1)
● Allow reversal of arguments:
elif(wavelength <= waveTable[index])
1.10 37 Correct [index - 2] to [index – 1] (1) print (rainbow[index - 1]) (10)

4
5
Question MP Appx. Answer Additional guidance Mark
number Line
2 Award marks as shown. ● Do not award mark if more than
2.1 20 if (letter.isalpha ()): (1) one line in each group of four is
uncommented
2.2 29 if (letter.isupper ()): (1)
2.3 32 if (value > ord ('Z')): (1)

2.4 41 elif (value < ord ('A')): (1)


2.5 48 elif (letter.islower ()): (1)

2.6 55 if (value > ord ('z')): (1)


2.7 60 elif (value < ord ('a')): (1)

2.8 68 newLetter = chr (value) (1)


2.9 76 cipherText = cipherText + newLetter (1)
2.10 81 cipherText = cipherText + letter (1) (10)

6
7
8
Question Appx. Mark
MP Answer Additional guidance
number Line
3 Award marks as shown.
purchaseType = int (0)

purchaseType = int () along with


3.1 18 purchaseType = 0 (1) purchaseType = 0

Do not award spelling or transcription errors for


this mark
3.2 26 PURCHASE_TYPE_ITEM (1)
3.3 26 and (1)
Allow
3.4 30 PURCHASE_TYPE_WEIGHT (1)
• != PURCHASE_TYPE_ITEM
3.5 33 float (1)

3.6 38 * (1)
Allow
3.7 42 <= 0 (1)
● <1
Allow
3.8 48 > (1)
● !=
● Must be syntactically correct
● Must include both message and total

print ("Total cost is", totalCost) (1) ● Allow any message text
3.9 51
● Allow concatenation (+) if conversion to string
provided for variable
● Ignore formatting of currency, if attempted
3.10 Functions for test data given in paper (1) (10)

9
Test Data

Purchase Count of Weight in


Output
Type items kilograms
1 3 Total cost is 3.69
1 0 Invalid number of items
5 4.5 Total cost is 15.525
5 -6.6 Invalid weight
QP = Invalid category
3 OR
Code = Invalid purchase type

10
11
Question MP Appx. Answer Additional guidance Mark
number Line
4 Award marks as shown.
Inputs
Two integer inputs taken and assigned to different
4.1
variables (1)
Crisps
bagsCrisps =
(numAdults * CRISPS_PER_ADULT) +
(numChild * CRISPS_PER_CHILD)
4.2 Calculate partial bags of crisps (1)

● Allow 0.75 and 0.33 instead of


constants
Cheese
gramsCheese =
(numAdults * CHEESE_PER_ADULT) +
(numChild * CHEESE_PER_CHILD)
4.3 Calculate grams of cheese required (1)

● Allow 40, 30, and 500 instead of


constants
4.4 Selection symbol translated to if/else for cheese (1)
Rolls
numRolls =
(numAdults * ROLLS_PER_ADULT) +
(numChild * ROLLS_PER_CHILD)
4.5 Calculate number of partial rolls required (1)

● Allow 1.5, 0.5, and 24 instead of


constants (15)
4.6 Selection symbol translated to if/else for rolls (1)

12
Overall
gramsCheese <= MIN_CHEESE
numRolls <= MIN_ROLLS
Conditional tests for both cheese and rolls use
4.7
relational operator (<=) accurately (1)
Allow:
● <
● Must be more than just the two
inputs in the flowchart to award this
Input and output messages are informative and fit for mark.
4.8
purpose (1) ● Must include code for messages for
five out of the nine possible
messages in the flowchart
One or more use of helpful white space AND one or
4.9 ● Ignore excessive comments
more use of helpful comments (1)
Use of given constants throughout, rather than hard- ● Constants are involved in all
4.10
coded values (1) relational and arithmetic expressions
Number conversions
math.ceil (<partial>)

Allow these, although the results


produced will be incorrect:
● round (<decimal>)
At least one instance of a syntactically accurate ● round (<decimal>, 0)
4.11 expression to convert from decimal to whole number, ● int (<decimal>)
even if the result is not correct
● //

Do not award
● %
● /

13
math.ceil (gramsCheese / MIN_CHEESE)
math.ceil (numRolls)
math.ceil() used correctly to convert at least one
4.12
decimal to whole number
● Can be awarded in addition to
MP4.11
Levels-based mark scheme to a maximum of 3, from:
● Sequencing and selection used to
control program flow
4.13
● input() and print() used to
4.14 Functionality (3)
implement keyboard/console I/O
4.15
● Built-in subprograms used to abstract
functionality

Test Data

Crisps Cheese Rolls


Partial Partial Partial
Test Data Adults Children Bags to order Order Order
required required required
Set 1 10 3 8.49 9 1 16.5 1
Set 2 45 14 38.37 39 5 74.5 4

14
Functionality (levels-based mark scheme)

0 1 2 3 Max.

Functionality (when the code Functionality (when the code Functionality (when the code 3
is run) is run) is run)
● The component parts of the ● The component parts of the ● The component parts of the
program are incorrect or program are complete, providing program are complete, providing
incomplete, providing a program a functional program that meets a functional program that fully
No of limited functionality that meets most of the stated requirements. meets the given requirements.
rewa some of the given requirements. ● Program outputs are mostly ● Program outputs are accurate,
rdabl ● Program outputs are of limited accurate and informative. informative, and suitable for the
e accuracy and/or provide limited user.
● Program responds predictably to
mate information. most of the anticipated input. ● Program responds predictably to
rial
● Program responds predictably to ● Solution may not be robust anticipated input.
some of the anticipated input. within the constraints of the ● Solution is robust within the
● Solution is not robust and may problem. constraints of the problem.
crash on anticipated or provided
input.

15
16
Question MP Appx. Answer Additional guidance Mark
number Line
5 Award marks as shown.
getChoice()
menu item choice returned from getChoice()
5.1
subprogram (1)
getShape()
Random number generated, even if upper bound is
5.2
not correct (1)
random.randint (0, len (pTable) - 1)
Upper bound on random number is controlled by random.randint (0, len (pastaShapes) - 1)
5.3
length of the array (1)
● Allow omission of -1
● Ignore value of index inside the [ ]
One-dimensional indexing used to access shape in
5.4 ● Allow use of global pastaShapes, instead
array (1)
of pTable parameter
addShape()
● Allow insert instead of append
5.5 String shape name is appended to array (1)
● Allow even if global pastaShapes is target
Subprograms
addShape() and getShape() use the parameter ● Do not award if pastaShapes appears
5.6
pTable to access the array (1) inside either subprogram
Main Program
Condition-controlled loop (while not choosing to
5.7
exit) (1)
Selection must handle all options (exit, get, add, ● Allow switch statement
5.8
show, error) (1) ● Allow hard-coded rather than constants
5.9 Final call to getChoice() inside main loop (1) (15)

17
Considerations for levels-based mark
Levels-based mark scheme to a maximum of 6, scheme:
from:

● [6.3.2] Consistent use of provided


constants for menu handling throughout
or use of switch statement with hard-
5.10 coded constant equivalents
5.11 Solution design (3) ● [6.6.3] getShape() is implemented as a
5.12 function that returns a value
● [6.4.1] User message provided for invalid
choices (could be in main program loop
or in getChoice())
● [6.1.6] Get, add, and show function
correctly
5.13
● [6.4.1] Exits when option 4 is chosen at
5.14 Functionality (3)
both prompts
5.15
● [6.1.1] Subprogram calls match user
numbers selected from the menu

18
Test Data

Choice Additional Output Note


Bigoli
Strozzapreti
Trofie
Gigli
Chitarra
3 10 items
Penne
Orecchiette
Tagliatelle
Chonchiglie
Fusilli
2 ZZZZZ
Bigoli
Strozzapreti
Trofie
Gigli
Chitarra
3 Penne 11 items
Orecchiette
Tagliatelle
Chonchiglie
Fusilli
ZZZZZ
A shape
Check call to random.randint to make sure it will generate all items
1 from the
from 0 to the length of the table - 1
list
A shape
1 from the
list
Invalid The program should display an error message and loop. It may display
5
input the menu again or it may not. Either way is acceptable.
Exits
4
program

19
Solution design (levels-based mark scheme)

0 1 2 3 Max.

● There has been little attempt to ● There has been some attempt to ● The problem has been 3
decompose the problem. decompose the problem. decomposed clearly into
● Some of the component parts of ● Most of the component parts of component parts.
the problem can be seen in the the problem can be seen in the ● The component parts of the
solution, although this will not be solution. problem can be seen clearly in
No complete. the solution.
● Most parts of the logic are clear
rewa
● Some parts of the logic are clear and appropriate to the problem. ● The logic is clear and appropriate
rdabl
and appropriate to the problem. The use of variables and data to the problem.
e ●
mate ● The use of variables and data structures is mostly appropriate. ● The choice of variables and data
rial structures, appropriate to the ● The choice of programming structures is appropriate to the
problem, is limited. constructs is mostly appropriate problem.
● The choice of programming to the problem. ● The choice of programming
constructs, appropriate to the constructs is accurate and
problem, is limited. appropriate to the problem.

20
Functionality (levels-based mark scheme)

0 1 2 3 Max.

Functionality (when the code Functionality (when the code Functionality (when the code 3
is run) is run) is run)
● The component parts of the ● The component parts of the ● The component parts of the
program are incorrect or program are complete, providing program are complete, providing
incomplete, providing a program a functional program that meets a functional program that fully
No of limited functionality that meets most of the stated requirements. meets the given requirements.
rewa some of the given requirements. ● Program outputs are mostly ● Program outputs are accurate,
rdabl ● Program outputs are of limited accurate and informative. informative, and suitable for the
e accuracy and/or provide limited user.
● Program responds predictably to
mate information. most of the anticipated input. ● Program responds predictably to
rial
● Program responds predictably to ● Solution may not be robust anticipated input.
some of the anticipated input. within the constraints of the ● Solution is robust within the
● Solution is not robust and may problem. constraints of the problem.
crash on anticipated or provided
input.

21
22
23
Appx
Question
MP . Answer Additional guidance Mark
number
Line
6 Award marks as shown.
6.1 Process every record in the input file (1)
6.2 Strip off the line feed on the last field (1)
6.3 Split the line on the commas (1) ● Requires argument of comma
First two characters of breed or name
6.4
extracted (1)
int(tagNumb) // 100
int (fields[2]) // 100
Number component of key calculated
6.5
correctly (1) ● Award calculation, even if number not in
correct place in the key
● Must be accurate call with correct parameter
6.6 Subprogram called to display table (1) and no other extraneous operations
Levels-based mark scheme to a maximum of
Considerations for levels-based mark scheme:
9, from:
● [6.4.2] Open file for reading and close if
6.7 required
6.8 Solution design (3)
● [6.2.2] Iteration is used appropriately
6.9
● [6.3.1] Data types and structures are used
appropriately
● [6.1.4] Program code is laid out in clear
sections; white space is used to show
6.10
Good programming practices (3) different parts of the solution/functionality
6.11
6.12 ● [6.1.4] Variable names are meaningful;
comments are provided and are helpful in
explaining logic (15)

24
● [6.3.1] Correct order for each field in the
record (key, tag, name, breed) and each
6.13
record in the table
6.14 Functionality (3)
6.15 ● [6.1.1] Use decomposition to solve problem
and create solution
● [6.1.2] Write in a high-level language

25
Output:

['Hi25An', '2569', 'Annabelle', 'Highland']


['Sh37Bo', '3798', 'Bonnie', 'Shetland']
['Be45Ca', '4521', 'Carmine', 'Belted Galloway']
['Hi57De', '5736', 'Delores', 'Highland']
['Sh65Ev', '6504', 'Evette', 'Shetland']
['Be77Fr', '7713', 'Francis', 'Belted Galloway']

Award where tag number is an integer:


['Hi25An', 2569, 'Annabelle', 'Highland']
['Sh37Bo', 3798, 'Bonnie', 'Shetland']
['Be45Ca', 4521, 'Carmine', 'Belted Galloway']
['Hi57De', 5736, 'Delores', 'Highland']
['Sh65Ev', 6504, 'Evette', 'Shetland']
['Be77Fr', 7713, 'Francis', 'Belted Galloway']

Award tuple output:


('Hi25An', '2569', 'Annabelle', 'Highland')
('Sh37Bo', '3798', 'Bonnie', 'Shetland')
('Be45Ca', '4521', 'Carmine', 'Belted Galloway')
('Hi57De', '5736', 'Delores', 'Highland')
('Sh65Ev', '6504', 'Evette', 'Shetland')
('Be77Fr', '7713', 'Francis', 'Belted Galloway')

Do not award where each record is a single string


'Hi25An,2569,Annabelle,Highland'
'Sh37Bo,3798,Bonnie,Shetland'
'Be45Ca,4521,Carmine,Belted Galloway'
'Hi57De,5736,Delores,Highland'
'Sh65Ev,6504,Evette,Shetland'
'Be77Fr,7713,Francis,Belted Galloway'

26
Solution design (levels-based mark scheme)

0 1 2 3 Max.

● There has been little attempt to ● There has been some attempt to ● The problem has been 3
decompose the problem. decompose the problem. decomposed clearly into
● Some of the component parts of ● Most of the component parts of component parts.
the problem can be seen in the the problem can be seen in the ● The component parts of the
solution, although this will not be solution. problem can be seen clearly in
No complete. the solution.
● Most parts of the logic are clear
rewa
● Some parts of the logic are clear and appropriate to the problem. ● The logic is clear and appropriate
rdabl
and appropriate to the problem. The use of variables and data to the problem.
e ●
mate ● The use of variables and data structures is mostly appropriate. ● The choice of variables and data
rial structures, appropriate to the ● The choice of programming structures is appropriate to the
problem, is limited. constructs is mostly appropriate problem.
● The choice of programming to the problem. ● The choice of programming
constructs, appropriate to the constructs is accurate and
problem, is limited. appropriate to the problem.

27
Good programming practices (levels-based mark scheme)

0 1 2 3 Max.

● There has been little attempt to ● There has been some attempt to ● Layout of code is effective in 3
lay out the code into identifiable lay out the code to aid separating sections, e.g. putting
sections to aid readability. readability, although sections all variables together, putting all
● Some use of meaningful variable may still be mixed. subprograms together as
No appropriate.
names. ● Uses mostly meaningful variable
rewa
● Limited or excessive names. ● Meaningful variable names and
rdabl
commenting. ● Some use of appropriate subprogram interfaces are used
e
commenting, although may be where appropriate.
mate ● Parts of the code are clear, with
rial limited use of appropriate excessive. ● Effective commenting is used to
spacing and indentation. ● Code is mostly clear, with some explain logic of code blocks.
use of appropriate white space to ● Code is clear, with good use of
aid readability. white space to aid readability.

28
Functionality (levels-based mark scheme)

0 1 2 3 Max.

Functionality (when the code Functionality (when the code Functionality (when the code 3
is run) is run) is run)
● The component parts of the ● The component parts of the ● The component parts of the
program are incorrect or program are complete, providing program are complete, providing
incomplete, providing a program a functional program that meets a functional program that fully
No of limited functionality that meets most of the stated requirements. meets the given requirements.
rewa some of the given requirements. ● Program outputs are mostly ● Program outputs are accurate,
rdabl ● Program outputs are of limited accurate and informative. informative, and suitable for the
e accuracy and/or provide limited user.
● Program responds predictably to
mate information. most of the anticipated input. ● Program responds predictably to
rial
● Program responds predictably to ● Solution may not be robust anticipated input.
some of the anticipated input. within the constraints of the ● Solution is robust within the
● Solution is not robust and may problem. constraints of the problem.
crash on anticipated or provided
input.

29
30

You might also like