1cp2 02 Rms 20240822
1cp2 02 Rms 20240822
1cp2 02 Rms 20240822
Summer 2024
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 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
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]
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)
6
7
8
Question Appx. Mark
MP Answer Additional guidance
number Line
3 Award marks as shown.
purchaseType = int (0)
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
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)
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>)
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
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:
18
Test Data
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:
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