GCSE Computer Science 2016 Sample Assessment Materials PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 106
At a glance
Powered by AI
The document provides information about sample assessment materials for Pearson Edexcel Level 1/2 GCSE in Computer Science, including changes made between issues and descriptions of programming syntax and constructs.

The document provides sample assessment materials for the Pearson Edexcel Level 1/2 GCSE in Computer Science qualification. It describes changes made to previous issues of the materials and includes descriptions of programming syntax and constructs relevant to the qualification.

The document describes several programming constructs including loops (REPEAT, FOR, FOR EACH), input/output, file handling, subprograms (PROCEDURES and FUNCTIONS), arithmetic and logical operators.

GCSE (9-1)

Computer Science

Sample Assessment Materials


Pearson Edexcel Level 1/Level 2 GCSE (9 - 1) in Computer Science (1CP1)
First teaching from September 2016
First certification from 2018 Issue 5
Edexcel, BTEC and LCCI qualifications

Edexcel, BTEC and LCCI qualifications are awarded by Pearson, the UK’s largest awarding
body offering academic and vocational qualifications that are globally recognised and
benchmarked. For further information, please visit our qualification website at
qualifications.pearson.com. Alternatively, you can get in touch with us using the details on
our contact us page at qualifications.pearson.com/contactus

About Pearson

Pearson is the world's leading learning company, with 35,000 employees in more than
70 countries working to help people of all ages to make measurable progress in their lives
through learning. We put the learner at the centre of everything we do, because wherever
learning flourishes, so do people. Find out more about how we can help you and your
learners at qualifications.pearson.com

References to third party material made in these sample assessment materials are made in
good faith. Pearson does not endorse, approve or accept responsibility for the content of
materials, which may be subject to change, or any opinions expressed therein. (Material may
include textbooks, journals, magazines and other publications and websites.)

All information in this document is correct at time of publication.

Original origami artwork: Mark Bolitho


Origami photography: Pearson Education Ltd/Naki Kouyioumtzis

ISBN 978 1 446 95847 6

All the material in this publication is copyright


© Pearson Education Limited 2018
Pearson Edexcel Level 1/Level 2 GCSE in Computer
Science
In April 2018 we made changes to our sample assessment materials (SAMs) because the
programming project no longer contributes to the final grade. These changes were
communicated in Issue 4. We have now made further changes to the programming project
brief, where we have relaxed the rules around the conditions under which the programming
project can be taken. We have also removed the pseudocode booklet from component 1, as
it is no longer used in this examination. These changes can be found in this issue (Issue 5).

The changes to Issue 4 were only made three months ago therefore we have kept those
summary of changes as well.

Summary of Pearson Edexcel Level 1/Level 2


GCSE in Computer Science SAMs Issue 4 changes
The NEA project is no longer being assessed in this qualification, however a computer
programming project must be completed by all students although it will not contribute to
their final grade.

The following changes have been made to the sample assessment materials to reflect this
change.

Summary of changes made between previous issue and this current Page
issue number

Instructions for the Computer Science Programming project brief have been
89
amended to reflect the fact that the project is no longer assessed.

The component code for the Computer Science Programming project has been
89
removed as it is no longer assessed.

Marks have been removed from the Computer Science Programming project
89-92
brief.

Summary of Pearson Edexcel Level 1/Level 2


GCSE in Computer Science SAMs Issue 5 changes

Summary of changes made between previous issue and this current Page
issue number

The front page of component 1 question paper has been updated to reflect that
the pseudocode booklet is no longer used with this examination. The pseudocode 5
booklet is no longer displayed after component 1 in this SAMs booklet.

The paper reference codes on the front of the pseudocode booklet have changed
to show only the code for component 2 (1CP1/02) as this booklet is not used 63, 93
with component 1.

The front cover of the project brief has been amended to reflect the new
89
conditions under which this task must be taken.

If you need further information on these changes or what they mean, contact us via our
website at: qualifications.pearson.com/en/support/contact-us.html.
Contents

Introduction 1
General marking guidance 3
Component 1 5
Component 1 Mark scheme 23
Component 2 37
Components 2 and the Programming Project – Pseudocode command set 63
Component 2 Mark scheme 71
Programming project 89
Components 2 and the Programming Project – Pseudocode command set 93
Introduction
The Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science is designed for use
in schools and colleges. It is part of a suite of GCSE qualifications offered by Pearson.
These sample assessment materials have been developed to support this
qualification and will be used as the benchmark to develop the assessment students
will take.

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 1


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
2 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
General marking guidance
 All candidates must receive the same treatment. Examiners must mark the last
candidate in exactly the same way as they mark the first.
 Mark schemes should be applied positively. Candidates must be rewarded for what
they have shown they can do rather than be penalised for omissions.
 Examiners should mark according to the mark scheme – not according to their
perception of where the grade boundaries may lie.
 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/indicative content will not be
exhaustive.
 When examiners are in doubt regarding the application of the mark scheme to a
candidate’s response, a senior examiner must be consulted before a mark is given.
 Crossed-out work should be marked unless the candidate has replaced it with an
alternative response.

How to award marks when level descriptions are used


Finding the right level
The first stage is to decide which level the answer should be placed in. To do this, use a
‘best-fit’ approach, deciding which level most closely describes the quality of the answer.
Answers can display characteristics from more than one level, and where this happens
markers must use their professional judgement to decide which level is most
appropriate.
Placing a mark within a level
After a level has been decided on, the next stage is to decide on the mark within the
level. The instructions below tell you how to reward responses within a level. However,
where a level has specific guidance about how to place an answer within a level, always
follow that guidance. Statements relating to the treatment of students who do not fully
meet the requirements of the question are also shown in the indicative content section of
each levels based mark scheme. These statements should be considered alongside the
levels descriptors.
Markers should be prepared to use the full range of marks available in a level and not
restrict marks to the middle. Markers should start at the middle of the level (or the
upper middle mark if there is an even number of marks) and then move the mark up or
down to find the best mark. To do this, they should take into account how far the answer
meets the requirements of the level:
• If it meets the requirements fully, markers should be prepared to award full marks
within the level. The top mark in the level is used for answers that are as good as
can realistically be expected within that level
• If it only barely meets the requirements of the level, markers should consider
awarding marks at the bottom of the level. The bottom mark in the level is used for
answers that are the weakest that can be expected within that level

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 3


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
4 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Write your name here
Surname Other names

Centre Number Candidate Number


Pearson Edexcel
Level 1/Level 2 GCSE

Computer Science
Component 1: Principles of Computer Science

Sample Assessment Material Paper Reference

Time: 1 hour 40 minutes 1CP1/01


You do not need any other materials. Total Marks

Instructions
• Use black ink or ball-point pen.
• Fill in the boxes at the top of this page with your name,
centre number and candidate number.
• Answer all questions.
• Answer the questions in the spaces provided
– there may be more space than you need.

Information
• The total mark for this paper is 80.
• –Theusemarks for each question are shown in brackets
this as a guide as to how much time to spend on each question.
• You are not allowed to use a calculator.
Advice
• Read each question carefully before you start to answer it.
• Try to answer every question.
• Check your answers if you have time at the end.

Turn over

S49766A
©2016 Pearson Education Ltd.
*S49766A0117*
1/1/1/1/1/1/1/1/1/1/1

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 5


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Answer ALL questions. Write your answers 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 .
1 Computing devices are made up of many different types of internal components that
hold, manipulate or transmit data.
(a) Name the component that holds instructions and data for programs waiting to be
run by the CPU.
(1)

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

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

(b) Identify the type of memory used to make up for the difference in speed of two
internal components.
(1)

A ROM
B Cache
C Virtual
D Non-volatile

(c) The ASCII code for the character ‘D’ is 68 in denary.


Derive the ASCII code for the character ‘J’ in denary.
(1)

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

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

(d) Storage capacities and network data speeds require measurements.


(i) The capacity of some storage media is measured in bytes.
Calculate how many bytes there are in three kilobytes of disc storage.
(2)

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

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

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

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

2
*S49766A0217*
6 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
(ii) Calculate how many bits are being transmitted per second for a network
described as three Mbps.
(2)

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

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

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

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

(e) Identify a network protocol that is used for emails.


(1)

A TCP/IP
B Wi-Fi
C HTTP
D IMAP

(f ) Describe the process for communication in the client-server network model.


(4)

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

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

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

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

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

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

(g) Identify the reason for using hexadecimal to represent data.


(1)
A Hexadecimal uses letters instead of digits

B Hexadecimal takes up less memory in the machine

C Hexadecimal is easier for humans to read

D Hexadecimal is quicker for the machine to interpret

(Total for Question 1 = 13 marks)

*S49766A0317*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 3
7
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
2 Different types of compression are used for different purposes.
(a) A travel company has designed some brochures that contain images and
text in desktop publishing format. The travel company sends the documents
electronically to a printing company for them to be printed.
Explain why the travel company uses lossless compression to send
the documents.
(2)

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

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

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

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

(b) Compression normally reduces file size.


State two other characteristics of lossy compression.
(2)

1 . . . . . . . . ................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . .

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

2 . . . . . . . . ................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . .

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

(c) Run length encoding (RLE) is a type of image compression. Some data for an
image is shown.

b b b r g g g g r r

Show the result of compressing this data for the image using RLE.
(2)

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

(Total for Question 2 = 6 marks)

4
*S49766A0417*
8 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
3 Many different types of software are written by programmers and used in
computing devices.
(a) An engineer complains that her disc is too slow. She has been abroad and has
used her Wi-Fi in different locations. She has checked that her anti-virus software
is up to date.
Explain how different types of utility software could be used to fix the problem.
(3)

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

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

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

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

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

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

(b) Give two reasons why high-level programming languages are preferred for some
programming tasks.
(2)

1 . . . . . . . .................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . .

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

2 . . . . . . . .................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . .

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

(c) Explain how software can be protected as intellectual property.


(2)

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

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

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

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

*S49766A0517*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 5
9
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
(d) Discuss the benefits of using subprograms when writing software solutions.
(6)

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

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

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

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

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

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

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

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

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

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

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

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

(Total for Question 3 = 13 marks)

6
*S49766A0617*
10 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
4 The ability to share data via networks has many advantages, but there are also
disadvantages.
(a) Describe the role of protocols in a network.
(2)

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

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

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

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

(b) A patch for an instant messaging application is available.


Explain why users of the application should apply the patch.
(2)

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

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

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

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

*S49766A0717*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 7
11
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
(c) A drawing of a home network is shown.

Rest of
Internet
C

B A
Internet
Service
Provider

Printer

Describe how data is transmitted from device B to device C.


(2)

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

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

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

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

8
*S49766A0817*
12 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
(d) The senior leadership team at a school is discussing different storage media.
The administrative staff want to use the ‘cloud’. The technical team wants to use
servers located on the school grounds.
Compare storing data in the ‘cloud’ with storing data on hard discs connected to
the school’s servers.
(6)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

(Total for Question 4 = 12 marks)

*S49766A0917*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 9
13
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
5 Modern society depends on many different embedded systems to function properly.
(a) Explain one function of the embedded system in a washing machine.
(2)

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

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

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

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

(b) Boolean operators are used in embedded systems.


Draw the truth table for the Boolean operator AND.
(1)

(c) Boolean expressions can be used to represent logical behaviours.


• The lights in a room are controlled by an embedded system.
• There is a power (P) switch to control the lights.
• A movement (M) sensor will turn the lights on when there is a person in the
room, provided the power switch has been left in the on position.
• An override (O) switch will turn the lights on, regardless of the state of the
movement sensor, provided the power switch has been left in the on position.
Construct a logic statement to represent the logic of this behaviour, using the
symbols P, M, and O.
(3)

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

10
*S49766A01017*
14 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
(d) Bit patterns can be used to represent the different states of an embedded system.
These bits can be manipulated by several different operations.
Identify the result of applying a logical shift left by 3 to the 8-bit binary number
0101 0101.
(1)
A 1010 1111
B 1010 1000
C 0100 0100
D 1010 1010

(Total for Question 5 = 7 marks)

6 Algorithms are used to store images, solve problems, encrypt and sort data, and to
control devices.
(a) State what is meant by the term ‘algorithm’.
(2)

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

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

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

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

(b) Give two reasons why an unauthorised person cannot understand


encrypted data.
(2)

1 . . . . . . . .................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . .

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

2 . . . . . . . .................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . .

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

*S49766A01117*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 11
15
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
(c) A Caesar cipher is a simple encryption algorithm based on shifting.
Explain whether a shift of +7 followed by a shift of -2, is more secure than a single
shift when applied to the word ‘pink’.
You should include a diagram in your answer.
(3)

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

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

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

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

12
*S49766A01217*
16 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
(d) (i) State what is meant by a ‘pixel’.
(1)

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

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

(ii) A simple bitmap image has the following characteristics:


4-bit colour depth (bit depth)
100 pixels by 300 pixels.
Calculate the size of this image in bytes.
(2)

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

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

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

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

(e) A list is made up of the numbers 84, 52, 4, 6, 68, 39, 53, 1.
Show the steps involved when sorting this list of numbers using a merge
sort algorithm.
(2)

(f ) A programmer is writing software for a new set-top receiver for satellite TV.
Explain why the programmer should use a compiler instead of an interpreter to
translate the code.
(2)

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

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

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

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

*S49766A01317*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 13
17
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
(g) State what is meant by the term ‘abstracting’.
(2)

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

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

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

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

(h) Games software involves the use of algorithms and abstractions.


(i) A software game involves the use of two dice. An algorithm in this game is
called ‘roll’.
State the purpose of the algorithm ‘roll’.
(1)

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

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

(ii) Give a reason why ‘roll’ is an abstraction.


(1)

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

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

(Total for Question 6 = 16 marks)

14
*S49766A01417*
18 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
7 Different types of data can be represented digitally.
(a) Negative numbers can be represented digitally.
(i) Complete the table to show how +6 is represented in binary and how -6 is
represented in two’s complement.
Space for working out.
(2)

+6

-6

(ii) Compare two features of the two’s complement representation of negative


numbers with the sign-magnitude representation.
(2)

1 . . . . . . ................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . .

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

2 . . . . . . ................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . .

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

*S49766A01517*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 15
19
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
(iii) Two 8-bit binary numbers, 1011 0100 and 1001 0001, are added.
Identify the letter that represents the true statement about the result.
(1)
A 1100 0101
B 0100 0101
C Both A and B are accurate
D None of the above are accurate

(b) Sound can be stored on a digital device, but only after being converted from its
naturally occurring state.
Sound Transformation

60

50
A (the entire line)
40
Values
30

20
C
10 B

0
0 5 10 15 20 25 30
Time

(i) Identify each of the items (A, B, C) shown on the image in relation to the
conversion required to store sound on a digital device.
(3)

A . . . . . .................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................. . . . . . . . . . . . . . . . . . . . .

B . . . . . . . .................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................. . . . . . . . . . . . . . . . . . . . .

C . . . . . . .................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . .

16
*S49766A01617*
20 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
(ii) Explain the effect of increasing the sampling frequency for this
sound conversion.
(3)

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

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

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

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

(Total for Question 7 = 11 marks)

TOTAL FOR PAPER = 80 MARKS

*S49766A01717*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 17
21
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
22 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Component 1 Mark scheme

Question Answer Additional Guidance Mark


Number
1(a) The name of the required component:  Do not award memory
 Main memory/RAM/Random Access Memory (1) alone. (1)

Question Answer Additional Guidance Mark


Number
1(b)  B [Cache] (1) (1)

Question Answer Additional Guidance Mark


Number
1(c) Derivation of the required ASCII code: /01
 Derive the fact that 74 denary is the ASCII value for the letter ‘J’ (1)

Example:
D, E, F, G, H, I, J == 68, 69, 70, 71, 72, 73, 74
J – D = 6; 68 + 6 = 74 (1)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Question Answer Additional Guidance Mark
Number
1(d)(i) Calculation:  Units are not required.
 1 kilobyte = 1024 bytes (1)  Award full marks for
 3 x 1024 or 3072 (1) the correct numerical
answer. (2)

Question Answer Additional Guidance Mark


Number
1(d)(ii) Calculation:  Units are not required.
 1 Megabit = 1000000 bytes (1)  Award full marks for

Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
 3 x 1000000 or 3000000 (1) the correct numerical
answer. (2)

23
24
Question Answer Additional Guidance Mark
Number
1(e)  D [IMAP] (1) (1)

Question Answer Additional Guidance Mark


Number
1(f) A description that makes reference to the following points:  Do not award examples
 A client uses the address of the server to make a connection (1) only, such as a web page
 then the client sends a request to the server/client request services from the and browsers.
server (1)
 The server obtains the address of the client once that client makes a connection
to the server (1)
 then the server sends the requested data/services (to the client) (1) (4)

Question Answer Additional Guidance Mark


Number
1(g)  C [Hexadecimal is easier for humans to read] (1) (1)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Question Answer Additional Guidance Mark
Number
2(a) An explanation that makes reference to the following points:
 lossless compression ensures that no data is lost (1)
 so that the desktop published file can be restored so that it is exactly the same
as the original (1) (2)

Question Answer Additional Guidance Mark


Number
2(b) Any two from:
 Data is removed during the compression process (1)
 The removed data is not normally noticed by a human (sight, sound) (1)
 The original contents of the file cannot be restored exactly (1) (2)

Question Answer Additional Guidance Mark


Number
2(c)  Letters in correct order (1)  Disregard spacing.
 Correct number (1)  The single instance of ‘r’ in
Either: 3b 1r 4g 2r position 2, must be

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Or denoted by ‘1r’ or ‘r1’. The
b3 r1 g4 r2 numeric value is necessary. (2)

Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
25
26
Question Answer Additional Guidance Mark
Number
3(a) An explanation that makes reference to two of the following points:  Allow archive as
 Defragmentation software moves file blocks closer together (1) equivalent to backup
 Compression software reduces file sizes using less space (1) and delete.
 Use backup software to move files to a secure place and deleting files on the
hard disc frees up space (1)
and
 this speeds up disc access times to the files (which will improve the speed of the
disc) (1) (3)

Question Answer Additional Guidance Mark


Number
3(b) Any two reasons from:
 Instructions are close to English/easier for humans to read/write than a low-level
language/makes fewer errors (1)
 It’s quicker to develop code/easier to maintain code (than if it were written in a
low-level language) (1)
 They are usually available across many platforms/chipsets/operating systems (1) (2)

Question Answer Additional Guidance Mark


Number
3(c) An explanation that makes reference to the following point:  Do not award marks for
 Intellectual property can be protected by copyright/patent laws (1) examples only.
Plus one from:  Do not accept ‘prevents
 so that by registering the patent the patent holder has exclusive rights to theft’.
make/use/sell the software (1)
 so that by registering the copyright the source/(object) code is protected (1) (2)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Question Indicative content Mark
Number
3(d) Indicative content:
 are written only once/no repeated/copied blocks of code (1)
 only needs to be debugged once (1)
 can be reused/called from anywhere in the program (1)
 make main program more readable/shorter (1)
 can reduce the need for global variables (1)
 can be put into libraries/reused in other programs/shared with others (1)
 can be used to hide complex code/functionality (1)
 can be written in low-level languages for special purpose/interact with hardware/optimise performance (1)
(6)

Level Mark Descriptor

0 No rewardable content.
Level 1 1–2 Basic, independent points are made showing elements of knowledge and understanding of key concepts/principles
of computer science.

The discussion will contain basic information with little linkage between points made.

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Level 2 3–4 Demonstrates adequate knowledge and understanding of key concepts/principles of computer science.

The discussion shows some linkages and lines of reasoning with some structure.
Level 3 5–6 Demonstrates comprehensive knowledge and understanding by selecting relevant knowledge and understanding
of key concepts/principles of computer science to support the discussion being presented.

The discussion shows a well-developed, sustained line of reasoning which is clear, coherent and logically
structured.

Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
27
28
Question Answer Additional Guidance Mark
Number
4(a) A description that makes reference to the following points:
 the protocol allows the devices on a network to communicate with each other (1)
 by the use of a common set of rules (1) (2)

Question Answer Additional Guidance Mark


Number
4(b) An explanation that makes reference to the following points:
 A patch will fix any known security issues (1)
 so the machine running the application is less vulnerable to successful
cyberattacks (1) (2)

Question Answer Additional Guidance Mark


Number
4(c) A description that makes reference to the following points:
 device B puts the address of device C into a packet/message to send (1)
 then device A reads that address and sends the packet to device C (1) (2)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Question Indicative content Mark
Number
4(d) Indicative content:
 The school/technical team will be responsible for backing up/disaster recovery if the data is stored on hard discs
(connected to the school's servers)
 The storage provider is responsible for backup/disaster recovery if the school stores its data in the 'cloud'
 The school's files are available without an internet connection if data is stored on hard discs (connected to the
school's servers)
 An internet connection is required to access the school's files if they are stored in the 'cloud'
 Staff at the school can access their files anywhere by using mobile devices if the school's files are stored in the
'cloud'
 The staff can access their files at school only if the data is stored on hard discs (connected to the school's servers)
 The school will be responsible for maintaining the servers, replacing them when they age/technology becomes
outdated
 The storage provider is responsible for updating the storage system in the cloud and providing new technology as
it evolves
 The school will be responsible for increasing the storage capacity of their servers as demands evolve
 The storage provider is able to provide additional storage space on demand. (6)

Level Mark Descriptor

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


0 No rewardable content.
Level 1 1–2 A comparison may be attempted but with limited application of knowledge and understanding of key concepts of
computer science to the theoretical context.

The comparison will contain basic information with some attempt made to link knowledge and understanding to
the given context.
Level 2 3–4 A comparison will be given with adequate application of knowledge and understanding of key concepts of
computer science to the theoretical context. Are occasionally supported through a linkage.

The comparison shows some linkages and lines of reasoning with some structure.
Level 3 5–6 A comparison will be given with comprehensive application of knowledge and understanding of key concepts of

Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
computer science to the theoretical context. Line(s) of reasoning are supported throughout by sustained
application of relevant evidence.

The comparison shows a well-developed and sustained lines of reasoning which is clear, coherent and logically
structured.

29
30
Question Answer Additional Guidance Mark
Number
5(a) An explanation that makes reference to the following points:  Other appropriate
 monitors weight of load (1) responses can be awarded.
 so that it can adjust water levels for small/large loads (1)
OR
 monitors water temperature (1)
 so it can maintain the required value by turning heating element on/off (1)
OR
 monitors soaking button setting (1)
 so that it can add additional time at the right place in the programme cycle (1)
OR
 monitors maximum spin switch setting (1)
 so that it can set required motor revolutions (1) (2)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Question Answer Additional Guidance Mark
Number
5(b) A truth table for the function of the operator AND: Any format for the truth table
 four different input combinations and four different correct output combinations is acceptable as long as four
different distinct inputs and
Examples four different distinct outputs
are discernible.
Input 1 Input 2 Output
0 0 0
0 1 0
1 0 0
1 1 1

Input 1 0 1
Input 2
0 0 0
1 0 1

False AND False = False

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


False AND True = False
True AND False = False
True AND True = True (1)

Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
31
32
Question Answer Additional Guidance Mark
Number
5(c) A logic statement that includes:  Disregard capitalisation.
 Correct use of ‘OR’ (1)  Overriding order of
 Correct use of ‘AND’ (1) precedence (NOT, AND, OR)
 Correct use of brackets or order of precedence if brackets not used (1) may require use of
brackets.
Examples:  Expression or parts of
 (O OR M) AND P expression may be in
 P AND (M OR O) different orders.
 (O AND P) OR (P AND M)  Any alternative equivalent
 O AND P OR P AND M expression should be
awarded. (3)

Question Answer Additional Guidance Mark


Number
5(d)  B [1010 1000] (1) (1)

Question Answer Additional Guidance Mark


Number
6(a) A statement that includes:
 an algorithm is a sequence of steps/step-by-step instructions (1)
 which (if followed exactly) will perform a specific task (1) (2)

Question Answer Additional Guidance Mark


Number
6(b) Two reasons:  Disregard responses
 Encrypted data is encoded/scrambled so that it cannot be understood (1) indicating ‘access’;
 The unauthorised person would not have the key to decrypt the data (1) encryption only makes the
data uninterpretable.
 Do not award secure/secret
alone. (2)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Question Answer Additional Guidance Mark
Number
6(c)  Applying a double shift to ‘pink’ to obtain unsp (1) Other forms of diagrams are
 Identifying +5 as the equivalent single shift to obtain unsp (1) acceptable.
 Recognise that both shifts give the same result, so the double shift is no more A simple statement to say that
secure than the single shift (1) the double shift is not as
secure can score a mark only if
pink pink explained in full.
+7 wpur +5 unsp
-2 unsp
(3)

Question Answer Additional Guidance Mark


Number
6(d)(i) A statement that includes: Do not accept picture element.
 a pixel is the smallest identifiable unit in a graphic image (1) (1)

Question Answer Additional Guidance Mark


Number

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


6(d)(ii)  Mathematical expression (1)  Accept any other equivalent
 15000 bytes (1) mathematical expression.
 Units not required.
Example:

(2)
��� � ���� � �
� �����
8

Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
33
34
Question Answer Additional Guidance Mark
Number
6(e)  Award 1 mark for each row of the process.  Award 1 mark for each
step.
 Marks should not be
awarded for the last row.
84 52 4 6 68 39 53 1  Any notation showing
distinct lists at each stage
52 84 4 6 39 68 1 53 (1) is acceptable.

4 6 52 84 1 39 53 68 (1)

This leads to:

1 4 6 39 52 53 68 84
(2)

Question Answer Additional Guidance Mark


Number
6(f) An explanation that makes reference to the following points:  Disregard reference to
 The set-top box must process data quickly (1) cross-platforms; question
 so a compiler is used because compiled code runs faster than interpreted code context is a new chip.
(1) (2)

Question Answer Additional Guidance Mark


Number
6(g) A statement that includes:
 (Abstracting means) removing unnecessary detail/simplifying (1)
 so that we can focus on the essence/real part/important part of the problem (1) (2)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Question Answer Additional Guidance Mark
Number
6(h)(i) A statement that includes:  Accept between 1 and 12
 The purpose of ‘roll’ is to generate a single number, chosen randomly, between 1  Do not award ‘simulate a
and 12, inclusive (1) roll of dice’ or equivalent.
OR
 Two numbers between 1 and 6 (1)

Question Answer Additional Guidance Mark


Number
6(h)(ii) One of the following reasons:
 ‘Roll’ is an abstraction because it allows the programmer to focus on the result of
a roll, rather than on how to implement the roll algorithm (1)
OR
 ‘Roll’ is an abstraction because it is a model/simulation/representation of a
real/physical activity/action (1) (1)

Question Answer Additional Guidance Mark


Number

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


7(a)(i)  One mark for each correct row (2):

0 0 0 0 0 1 1 0
1 1 1 1 1 0 1 0
(2)

Question Answer Additional Guidance Mark


Number
7(a)(ii) The comparison should include reference to both two’s complement and signed-
magnitude numbers for any two of the following:
 Addition of two’s complement will always work (1)
 Addition of sign-magnitude numbers does not always work (1)

Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
 There is only one way to represent the number 0 in two’s complement (1)
 There are two ways to represent the number 0 in sign-magnitude numbers (1) (2)

35
36
Question Answer Additional Guidance Mark
Number
7(a)(iii) D [None of the above are accurate] (1)  Overflow has occurred so
8-bits are not large enough
to hold the result.
 325 = 1 0100 0101 (1)

Question Answer Additional Guidance Mark


Number
7(b)(i) Correct identification of the labelled items:  Do not allow sampling
A. Analogue signal/sound wave (1) frequency as equivalent to
B. Sample interval (1) sampling interval.
C. Amplitude (1) (3)

Question Answer Additional Guidance Mark


Number
7(b)(ii) An explanation that makes reference to the following points:  Do not award responses
 (Higher sampling frequencies) generate more sampling data (1) referring to bit rate.
 which increases memory/storage requirements (1)  Do not award responses
 and gives a more accurate digital representation (of the original signal) (1) indicating quality of
playback. (3)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Write your name here
Surname Other names

Centre Number Candidate Number


Pearson Edexcel
Level 1/Level 2
GCSE (9–1)

Computer Science
Component 2: Application of Computational
Thinking
Sample assessment material for first teaching Paper Reference

September 2016 1CP1/02


Time: 2 hours

You will need: Total Marks


Booklet containing pseudo commands.

Instructions
• Use black ink or ball-point pen.
• Fill in the boxes at the top of this page with your name,
centre number and candidate number.
• Answer all questions.
• Answer the questions in the spaces provided
– there may be more space than you need.
• You are not allowed to use a calculator.
Information
• The total mark for this paper is 80.
• –Theusemarks for each question are shown in brackets
this as a guide as to how much time to spend on each question.

Advice
• Read each question carefully before you start to answer it.
• Try to answer every question.
• Check your answers if you have time at the end.

Turn over

S49768A
©2016 Pearson Education Ltd.
*S49768A0126*
1/1/1/1/1

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 37


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Answer ALL questions. Write your answers in the space provided.
Questions in this paper are based on a scenario.

Sparky Autos
Sparky Autos is a family-run business based on a farm. The business
offers visitors the opportunity to drive small electric cars around a
racetrack on the farm.
There are up to 20 electric cars available each time for a race.
Each car has:
• an electronic tag so its number and position can be tracked using
sensors placed around the farm
• a number painted on its side.

1 Cars at Sparky Autos are serviced regularly to check that they are safe and reliable.
A service can be triggered by the car being run for 100 hours or if 30 days have passed.
(a) State two variables that need to be created to store data for each car.
(2)

1 . . . . . . . .................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . .

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

2 . . . . . . . .................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . .

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

(b) Each car takes at least 30 minutes to service. Older cars take longer to service. Ten
minutes is added for each full year of the car’s age. The year of purchase is known.
Construct a general expression showing the time needed to service any car.
(2)

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

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

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

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

(Total for Question 1 = 4 marks)

2
*S49768A0226*
38 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
2 A computer program can be used to determine information about the cars and the
drivers.
(a) Complete the table to show an input, a process and an output, using the
following information:
• each race has 5 laps
• there are 10 cars in this race.
(3)

Input Process Output

Calculate overall total time


Sum of lap times
for any car in the race
10 car numbers and 10 Car number with quickest
total times total time
10 car numbers with 5 lap Find car with quickest lap
times each time

(b) The arithmetic operator modulus (MOD) manipulates numbers. It could be used
in the calculations required by the processes in the table above.
State the purpose of the MOD function.
(1)

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

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

(Total for Question 2 = 4 marks)

*S49768A0326*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 3
39
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
3 Sparky Autos gives discounts based on the number of visitors in a group.
The pseudo-code for an algorithm that determines group discounts is shown.

(a) Complete the table to show the output of the pseudo-code algorithm, based on
the given inputs.
(3)

Input
Output displayed
numAdults numChildren

8 0

2 2

12 0

(b) The pseudo-code algorithm needs to be tested more thoroughly.


Construct test data to meet the requirements set out in the table.
(2)

Input
Requirements
numAdults numChildren

A condition generating ‘regular pricing’ 0

Smallest group qualifying for ‘family discount’

(Total for Question 3 = 5 marks)

4
*S49768A0426*
40 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
BLANK PAGE
QUESTION 4 BEGINS ON THE NEXT PAGE.

*S49768A0526*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 5
41
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
4 A computer programmer uses a programming language to write program code for
Sparky Autos.
(a) State two techniques that the programmer could use to make the code easy to read.
(2)

1 . . . . . . . .................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . .

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

2 . . . . . . . .................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . . .

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

(b) In the summer, Sparky Autos is open more hours each day. This means additional
members of staff are needed.
Pseudo-code that works out the number of days that additional members of staff
are needed is shown.

(i) Complete the table to identify the line number(s) that show one example of
each of the different programming constructs.
(4)

Programming construct Line number(s)

A comment

An integer variable initialisation

Selection

Iteration

6
*S49768A0626*
42 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
(ii) Complete the trace table showing the execution of the pseudo-code. You may
not need to fill in all the rows in the table.
(4)

Length Count Index Extra (index)

(Total for Question 4 = 10 marks)

*S49768A0726*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 7
43
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
5 Sparky Autos collects data about many different aspects of the business.
(a) An algorithm had an error as shown.

A programmer corrected the error as the code translator displayed this message.

Explain this type of error.


(2)

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

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

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

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

8
*S49768A0826*
44 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
(b) The pseudo-code for an algorithm that determines the maximum number of
visitors in a three-day period is shown.

Line 10 and line 13 each have a logic error.


Identify the error in each line and construct new lines of code that will correct the
errors.
(4)

Error Correction

Line 10

Line 13

*S49768A0926*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 9
45
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
(c) Complete the table to give the appropriate data type of a variable to store each item.
(4)

Item Data type

Gender of individual staff member

Whether an individual car is still under


the manufacturer’s warranty
Mean number of hours needed to
recharge the battery in each car

The number on the individual car

(d) Each member of staff:


• has a 4-digit ID number, such as 3865 or 4722
• works a whole number of hours on the days they work.
• works no more than 12 hours in a single day.
The business is open 7 days a week.
Draw a diagram of a data structure that shows the hours worked for each day of
the week. Include data for at least two members of staff.
(3)

(Total for Question 5 = 13 marks)

10
*S49768A01026*
46 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
BLANK PAGE
QUESTION 6 BEGINS ON THE NEXT PAGE.

*S49768A01126*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 11
47
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
6 A programmer has written subprograms to help him in his work.
The pseudo-code for a function to determine the amount of time elapsed between
the car switch being turned on and turned off is shown.

(a) The underlined item in line 18 has a name when used with the RETURN keyword.
State this name.
(1)

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

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

(b) Explain why the variable on line 2, totalTime, is not reset when the pseudo-code
on line 16 is executed.
(2)

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

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

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

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

12
*S49768A01226*
48 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
(c) Explain the effect of executing the pseudo-code on line 17.
(2)

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

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

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

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

(d) Validation is required for the items underlined in line 13.


Construct two validation tests and for each test give a piece of invalid test data.
(4)

Validation test Test data

(Total for Question 6 = 9 marks)

*S49768A01326*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 13
49
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018 Turn over
7 The pseudo-code for a procedure that repeatedly checks the time is shown. The effect
of calling this procedure is that the calling code waits for 5 seconds.

Amend this procedure so that it will wait for any number of required seconds without
user input.
(3)

(Total for Question 7 = 3 marks)

14
*S49768A01426*
50 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
BLANK PAGE
QUESTION 8 BEGINS ON THE NEXT PAGE.

*S49768A01526*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 15
51
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
8 At the start of a race, cars are placed on a starting grid in a staggered pattern.

When a car makes a false start it breaks a light beam and this notifies the computer
system. The race must be stopped if a car makes a false start.
• There is a maximum of 20 cars in a race.
• The programmer has chosen to use a 1-dimensional array to store this data.

16
*S49768A01626*
52 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Assess how appropriate a 1-dimensional array is as opposed to using separate
variables when storing this data.
(5)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

(Total for Question 8 = 5 marks)

*S49768A01726*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 17
53
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
9 Sparky Autos collects, stores, and processes data about its customers.
(a) It collects the names and postal addresses of customers. This data is stored in a
comma separated value file (CSV) with one record per line. The file contains over
5000 records. Part of the file is shown.

PP12 9AP, White, Winston, 67 Willow Street, Martinsville


SR45 8ZX, Brown, Brenda, 45 Birch Close, Flat Rock
PP08 3TR, Green, Geraldine, 128 Geranium Lane, Auburn
EG24 4KM, Black, Bobby, 132 Boxwood Grove, Galax

Sparky Autos wants to send a newsletter only to customers whose postcode


begins with ‘PP’.
Explain an improvement that could be made to the data from the file when used
for this purpose.
(3)

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

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

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

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

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

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

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

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

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

18
*S49768A01826*
54 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
(b) Before driving the cars, each customer fills in an information sheet. Customers
under 16-years old must have the sheet completed by a parent or guardian. The
information is entered into a computer program and stored on the hard disc of
the computer.
(i) Part of the information sheet is shown.

Identify two ethical issues of collecting this type of information.


(2)

1 . . . . . . .................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . .

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

2 . . . . . . .................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................................................................ . . . . . . . . . . . . . . . . . . . .

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

(ii) Give a reason why it may be illegal for organisations to share their data with
third parties.
(1)

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

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

(Total for Question 9 = 6 marks)

*S49768A01926*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 19
55
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
10 Each car at Sparky Autos has a pedal to make the car go forward.
(a) The drivers can make the car go forward by using the pedal.
• The closer the pedal is to the floor, the faster the car goes.
• The further the pedal is from the floor, the slower the car goes.
• Each car has its speed limited to 15 kilometres per hour.
Complete the flow chart to show this process.
(6)

20
*S49768A02026*
56 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Speed = 0

oldPos = height of
pedal off floor

newPos = height of
pedal off floor

newPos > No
oldPos?

Yes

No No
Speed Speed
< 15 > = 0.5

Yes Yes

Speed = Speed + 0.5 Speed = Speed - 0.5

*S49768A02126*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 21
57
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
(b) Each car also has direction indicators, which are controlled by an indicator switch
that is operated by the driver.
• The car has two indicator lamps, one on the right and one on the left.
• The indicator switch has three positions.
• The middle position is the off position.
• The up position is to indicate a right turn.
• The down position is to indicate a left turn.
• When a lamp is turned on, it flashes (on, off ) in 0.5 second intervals, until the
switch is moved to the off position.

22
*S49768A02226*
58 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Construct a flow chart to show this process.
(6)

(Total for Question 10 = 12 marks)

*S49768A02326*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 23
59
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
11 A light sequence is used to control the start of the races.
Only the red light is on at the start of the race.
Amber 1
The red light goes off and the first amber light goes on for
1 second.
Amber 2
It goes off and the second amber light goes on for 1 second.
Green
It goes off and the green light goes on to start the race.
The program for controlling the sequence for the lights has Red
two requirements.
• The race controller has to enter ‘y’ on the keyboard to start the light countdown.
• When a car makes a false start it breaks a light beam. If a car breaks a light beam
the race is stopped.
The controlling sequence for the lights has three subprograms that have been
written. These are shown in the table.

Subprogram Purpose

countGridBreaks() a function that returns the number of cars breaking their light beams

a procedure that resets all lights to their initial state and informs the
stopRace()
controller that the race is stopped

wait() a procedure that suspends execution for 1 second

24
*S49768A02426*
60 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Write an algorithm to control the sequence for the lights. Use pseudo-code or a
programming language with which you are familiar.
(9)

You may continue on the next page.

*S49768A02526*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 25
61
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
(Total for Question 11 = 9 marks)

TOTAL FOR PAPER = 80 MARKS

26
*S49768A02626*
62 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Pearson Edexcel Level 1/Level 2 GCSE (9–1)

Computer Science
Component 2 and the Programming Project

Sample assessment material for first teaching Paper Reference

September 2016 1CP1/02


Pseudocode command set

Do not return this resource booklet with the question paper.

Turn over

S50557A
©2016 Pearson Education Ltd.

1/1/1/1/1
*S50557A*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 63
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Pseudocode command set
Questions in the written examination that involve code will use this pseudocode for
clarity and consistency. However, students may answer questions using any valid method.
Data types
INTEGER
REAL
BOOLEAN
CHARACTER
Type coercion
Type coercion is automatic if indicated by context. For example 3 + 8.25 = 11.25
(integer + real = real)
Mixed mode arithmetic is coerced like this:

INTEGER REAL

INTEGER INTEGER REAL

REAL REAL REAL

Coercion can be made explicit. For example, RECEIVE age FROM (INTEGER) KEYBOARD
assumes that the input from the keyboard is interpreted as an INTEGER, not a STRING.
Constants
The value of constants can only ever be set once. They are identified by the keyword
CONST. Two examples of using a constant are shown.
CONST REAL PI
SET PI TO 3.14159
SET circumference TO radius * PI * 2
Data structures
ARRAY
STRING
Indices start at zero (0) for all data structures.
All data structures have an append operator, indicated by &.
Using & with a STRING and a non-STRING will coerce to STRING. For example, SEND ‘Fred’
& age TO DISPLAY, will display a single STRING of ‘Fred18’.

2 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


64 S50557A
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Identifiers
Identifiers are sequences of letters, digits and ‘_’, starting with a letter, for example:
MyValue, myValue, My_Value, Counter2
Functions
LENGTH()
For data structures consisting of an array or string.
RANDOM(n)
This generates a random number from 0 to n.
Comments
Comments are indicated by the # symbol, followed by any text.
A comment can be on a line by itself or at the end of a line.
Devices
Use of KEYBOARD and DISPLAY are suitable for input and output.
Additional devices may be required, but their function will be obvious from the context.
For example, CARD_READER and MOTOR are two such devices.
Notes
In the following pseudocode, the < > indicates where expressions or values need to be
supplied. The < > symbols are not part of the pseudocode.

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 3


S50557A 65
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
Variables and arrays
Syntax Explanation of syntax Example

SET Counter TO 0
SET Variable TO <value> Assigns a value to a variable.
SET MyString TO ‘Hello world’

Computes the value of an


SET Sum TO Score + 10
SET Variable TO <expression> expression and assigns to
SET Size to LENGTH(Word)
a variable.

Assigns a value to an element SET ArrayClass[1] TO ‘Ann’


SET Array[index] TO <value>
of a one-dimensional array. SET ArrayMarks[3]TO 56

Initialises a one-dimensional
SET Array TO [<value>, …] SET ArrayValues TO [1, 2, 3, 4, 5]
array with a set of values.

SET Array [RowIndex, Assigns a value to an element


SET ArrayClassMarks[2,4] TO 92
ColumnIndex] TO <value> of a two dimensional array.

Selection
Syntax Explanation of syntax Example
IF <expression> THEN IF Answer = 10 THEN
If <expression> is true then
<command> SET Score TO Score + 1
command is executed.
END IF END IF
IF <expression> THEN IF Answer = ‘correct’ THEN
If <expression> is true then first
<command> SEND ‘Well done’ TO DISPLAY
<command> is executed,
ELSE ELSE
otherwise second
<command> SEND ‘Try again’ TO DISPLAY
<command> is executed.
END IF END IF

4 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


66 S50557A
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Repetition
Syntax Explanation of syntax Example
WHILE <condition> DO Pre-conditioned loop. Executes WHILE Flag = 0 DO
<command> <command> whilst SEND ‘All well’ TO DISPLAY
END WHILE <condition> is true. END WHILE
Post-conditioned loop.
REPEAT Executes REPEAT
<command> <command> until <condition> SET Go TO Go + 1
UNTIL <expression> is true. The loop must execute UNTIL Go = 10
at least once.
Count controlled loop. The
REPEAT <expression> TIMES REPEAT 100-Number TIMES
number of times <command>
<command> SEND ‘*’ TO DISPLAY
is executed is determined by
END REPEAT END REPEAT
the expression.
FOR <id> FROM <expression>
FOR Index FROM 1 TO 10 DO
TO Count controlled loop. Executes
SEND ArrayNumbers[Index]
<expression> DO <command> a fixed number of
TO DISPLAY
<command> times.
END FOR
END FOR
FOR <id> FROM <expression>
TO FOR Index FROM 1 TO 500 STEP
<expression> STEP Count controlled loop using 25 DO
<expression> DO a step. SEND Index TO DISPLAY
<command> END FOR
END FOR
SET WordsArray TO [‘The’, ‘Sky’,
‘is’, ‘grey’]
FOR EACH <id> FROM
SET Sentence to ‘‘
<expression> DO Count controlled loop. Executes
FOR EACH Word FROM
<command> for each element of an array.
WordsUArray DO
END FOREACH
SET Sentence TO Sentence &
Word & ‘ ‘

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 5


S50557A 67
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
Input/output
Syntax Explanation of syntax Example

SEND ‘Have a good day.’ TO


SEND <expression> TO DISPLAY Sends output to the screen.
DISPLAY

RECEIVE Name FROM (STRING)


KEYBOARD
RECEIVE <identifier> FROM
RECEIVE LengthOfJourney
(type) Reads input of specified type.
FROM (INTEGER) CARD_READER
<device>
RECEIVE YesNo FROM
(CHARACTER) CARD_READER

File handling
Syntax Explanation of syntax Example
Reads in a record from a <file>
and assigns to a <variable>.
READ <File> <record> READ MyFile.doc Record
Each READ statement reads a
record from the file.
Writes a record to a file.
WRITE MyFile.doc Answer1,
WRITE <File> <record> Each WRITE statement writes a
Answer2, ‘xyz 01’
record to the file.

Subprograms
Syntax Explanation of syntax Example
PROCEDURE CalculateAverage
PROCEDURE <id> (<parameter>,
(Mark1, Mark2, Mark3)
…)
BEGIN PROCEDURE
BEGIN PROCEDURE Defines a procedure. SET Avg to (Mark1 + Mark2 +
<command>
Mark3)/3
END PROCEDURE
END PROCEDURE
FUNCTION AddMarks (Mark1,
FUNCTION <id> (<parameter>,
Mark2, Mark3)
…)
BEGIN FUNCTION
BEGIN FUNCTION
Defines a function. SET Total to (Mark1 + Mark2 +
<command>
Mark3)/3
RETURN <expression>
RETURN Total
END FUNCTION
END FUNCTION
Calls a procedure or a
<id> (<parameter>, …) Add (FirstMark, SecondMark)
function.

6 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


68 S50557A
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Arithmetic operators
Symbol Description
+ Add
- Subtract
/ Divide
* Multiply
^ Exponent
MOD Modulo
DIV Integer division

Relational operators
Symbol Description
= equal to
<> not equal to
> greater than
>= greater than or equal to
< less than
<= less than or equal to

Logical operators
Symbol Description
Returns true if both conditions
AND
are true.
Returns true if any of the
OR
conditions are true.
Reverses the outcome of the
NOT expression; true becomes false,
false becomes true.

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 7


S50557A 69
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
70 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Component 2 Mark scheme

Question Answer Additional Guidance Mark


Number
1(a) Any two from:  Accept meaningful
variable names tied to
 Date/time of last service (1). the scenario, e.g.
 Total running time since last service (1) CarNumber
 Details of last service (1)
 Overall total of running time since car bought (lifetime) (1)
 Car number (1) (2)

Question Answer Additional Guidance Mark


Number
1(b) An expression that includes:  Units not required

 Calculation showing age in years (1)


 30 min + (10 min * ageInYears) (1)

Example:

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


30 + (10 * (todayYear – purchaseYear))
(todayYear – purchaseYear) * 10 + 30
30 min + (10 min * (todayYear – purchaseYear)) (2)

Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
71
72
Question Answer Additional Guidance Mark
Number
2(a) One mark for each point:  Award as long as
meaning is discernible
Input Process Output

Calculate overall total


(up to) 5 lap times
time for any car in Sum of lap times
(1)
the race
10 car numbers and Car number with
Find the winner (1)
10 total times quickest total time

10 car numbers with Find car with quickest Car number with
5 lap times each lap time quickest lap time (1)

(3)

Question Answer Additional Guidance Mark


Number
2(b) One mark for a correct statement:

 Returns the integer part of a division (1)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Question Answer Additional Guidance Mark
Number
3(a) One mark for each correct answer in the last column:  In this order only in
last column

Input Output displayed

numAdults numChildren

small-group discount (1)


8 0

family discount (1)


2 2

large-group discount (1)


12 0

(3)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
73
74
Question Answer Additional Guidance Mark
Number
3(b) One mark for each correct row:

Input

Requirements numAdults numChildren

A condition generating
1/2/3/4 0
‘regular pricing’

Smallest group qualifying


2 1
for ‘family discount’

(2)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Question Answer Additional Guidance Mark
Number
4(a) Any two from:

 Indentation (1)
 White space (1)
 Descriptive identifiers (1)
 Comments (1) (2)

Question Answer Additional Guidance Mark


Number
4(b)(i) One mark for each correct answer:  In this order only in
last column of table
 Award only blocking
Programming construct Line number(s) lines indicated
(14, 16) and (13, 18)
A comment 2 (1)
 Ignore examples
An integer variable initialisation 9/10/11 (1)

Selection 14-16 (1)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Iteration 13-18 (1)
(4)

Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
75
76
Question Answer Additional Guidance Mark
Number
4(b)(ii) One mark for each accurately shown sequence (initialisation) or complete  Different formats of
pass through loop. tracing should be
awarded if
Example: synchronised change in
variables is discernible
 Quote marks not
required
Length Count Index Extended [index] Marks

3 0 0 (1)

‘Y’ (1)

‘N’ (1)

‘Y’ (1)

(4)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Question Answer Additional Guidance Mark
Number
5(a) An explanation that makes reference to the following point:
 This is a syntax error (1)
Plus one from:
 Because there is an error in using the grammar/rules of the programming
language (1)
 Because the word SET has been spelled incorrectly as TES/TES is not a
recognised command word (1) (2)

Question Answer Additional Guidance Mark


Number
5(b) An error and a correction for each line:  Do not penalise syntax
Line 10 errors as long as
 Error: The variable maximum doesn’t get reset to the maximum number of discernible
visitors/the variable maximum is initialised too high (1)  ‘-n’ is any negative
 Correction: SET maximum TO 0/SET maximum TO –n (1) integer
Line 13:
 Error: The for loop goes around too many times/the code goes past the end
of the visitor array/off-by-one error on array length (1)
 Correction: FOR index FROM 0 TO (length-1) DO (1) (4)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
77
78
Question Answer Additional Guidance Mark
Number
5(c) One mark for each correct row:

Item Data type

char/character (1)
Gender of individual staff member

Whether an individual car is still under the Boolean (1)


manufacturer’s warranty

Mean number of hours needed to recharge


Real (1)
the battery in each car

Integer (1)
The number on the individual car

(4)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Question Answer Additional Guidance Mark
Number
5(d) A diagram showing a data structure that includes:  Data must be
 2 or more rows (1) homogenous (all the
 8 columns (1) same type)
 Homogenous realistic integer data, between 0 and 12 inclusive (1)  At least two rows of data
must be included,
Example (3 marks): otherwise it’s a 1-D array
 Column/row headings, if
ID Mon Tue Wed Thurs Fri Sat Sun included, must be clearly
3865 10 8 5 5 8 0 0 distinguishable from the
4722 0 0 8 8 8 6 6 data
 Columns can be in any
Example (3 marks): order
 Ignore subscripts if
[0] [1] [2] [3] [4] [5] [6] [7] provided and clearly not
3865 10 8 5 5 8 0 0 part of the data
4722 0 0 8 8 8 6 6  If subscripts appear to
be part of the data and
Example (2 marks): they include
characters, then the

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Mon Tue Wed Thurs Fri Sat Sun third mark cannot be
10 8 5 5 8 0 0 awarded
0 0 8 8 8 6 6

Example (2 marks):

ID Mon Tue Wed Thurs Fri Sat Sun


3865 10 8 5 5 8 0 0
4722 0 0 8 8 8 6 6

Example (2 marks):

Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
[0] [1] [2] [3] [4] [5] [6] [7]
3865 10 8 5 5 8 0 0
4722 0 0 8 8 8 6 6
(3)

79
80
Question Answer Additional Guidance Mark
Number
6(a) One mark for the correct name:  Not RETURN alone,
 Return value/return result/result (1) which is in the question (1)

Question Answer Additional Guidance Mark


Number
6(b) An explanation that makes reference to the following points:
 The variable, totalTime, on line 16 is a local variable, which exists only inside
the function (1)
 so updating it will not change the value of totalTime on line 2, which is a
global variable (1) (2)

Question Answer Additional Guidance Mark


Number
6(c) An explanation that makes reference to the following points:
 Executing the pseudo-code on line 17 will have no effect on TOTALTIME (1)
 because the variable TOTALTIME has been defined on line 5 as a constant,
which means its value cannot be changed during execution (1) (2)

Question Answer Additional Guidance Mark


Number
6(d)  One mark for each correct validation test (1)  Do not penalise syntax
 One mark for each appropriate corresponding test data (1)  Accept appropriate
alternative values for the
The mark for test data identified must be linked with the associated data validation test data
test.

Example:

Validation test Test data


timeOn > 0 timeOn = 0
timeOff >= 0 timeOff = -3
(4)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Question Answer Additional Guidance Mark
Number
7 An amended procedure showing:  Do not penalise syntax,
 Parameter inserted (1) if discernible
 Less than (<) test using the new parameter (1)
 Descriptive variable name for the parameter relative to context (1)

Example:

(3)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
81
82
Question Answer Additional Guidance Mark
Number
8 An assessment that includes:  Do not award ‘more
 Using a 1-dimensional array is the most appropriate choice (1) complex to code’ alone
and four from:  Do award ‘more
 20 variables requires 20 distinct names (1) complex to code
 An array requires only one name (1) because you have to
 20 variables may require complex selection statements (1) keep track of more
 An array may require only one loop (1) variable names’
 20 variables are always needed even if fewer cars are in the race (1)
 An array can be allocated to the exact number of cars (1) (5)

Question Answer Additional Guidance Mark


Number
9(a) An explanation that makes reference to the following points:  Do not award generalities
 Sorting the file by postcode would make the searching more efficient
(1)
 because not every record has to be looked at to find the targeted
postcodes (1)
 since you can stop looking when you go past where your targeted postcode
should be (1) (3)

Question Answer Additional Guidance Mark


Number
9(b)(i) Identified issues that include:
 it is unethical to ask for the ethnic origin of a person who will be driving a car (1)
 Collected information can be directly tied to an identifiable individual
(1) (2)

Question Answer Additional Guidance Mark


Number
9(b)(ii) Any one from:  Accept violates the Data
 Redistribution of the data without permission may be illegal (1) Protection Act (DPA) 2003
 Use of data for purposes other than which it is collected for may be illegal (1)
 Organisations may have to ask permission before sharing personal data with a
third party (1) (1)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Question Answer Additional Guidance Mark
Number
10(a) A completed flow chart that includes:  Symbol and contents are
 Correct ellipse symbol for flow chart start (1) awarded independently
 Correct word ‘Start’ or ‘Begin’ in symbol (1)
 Correct diamond symbol for decision (1)
 Correct test ‘newPos < oldPos’ in symbol (1)
 Correct label ‘yes’ on bottom arrow (1)
 Correct label ‘no’ on right arrow (1) (6)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
83
Mark
Additional Guidance
Answer

(continued)
Question
Number
10(a)

84 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Question Answer Additional Guidance Mark
Number
10(b) A flowchart that includes the following aspects:  Disregard use of ‘stop’
instead of loop as shown in
example
Aspect of Marks  Do not penalise use of plain
Solution 0 1 2 3 rectangle instead of
Functionality No There are There are input/output flow chart
awardable significant errors There are minor no errors in symbol, if discernible
content in logic, leading errors in logic, logic,
to an overall leading to an leading to
solution that is overall solution an overall
non-functional that is not solution that
completely is fully
functional functional
Accuracy of No Notation follows Notation follows a Notation
Notation awardable a broadly recognisable follows a
content unrecognisable convention which recognisable

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


convention that is broadly convention
is applied discernible but is and is
inconsistently, applied applied
although aspects inconsistently consistently
of it are throughout
discernible

There are a maximum of 3 marks for functionality.


There are a maximum of 3 marks for accuracy of notation.
The marks for functionality and accuracy are awarded independently.

Example:

Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
85
86
Question Answer Additional Guidance Mark
Number
10(b)
(Continued) Start

Switch No Switch No
up? down?

Yes Yes

Turn right Turn left


lamp on lamp on

Wait 0.5 Wait 0.5

Turn right Turn left


lamp off lamp off

No No Yes
Switch Switch
off? off?

Yes
(6)

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Question Answer Additional Mark
Number Guidance
11 Pseudo code that has the following aspects:

Aspect of Marks
Solution 0 1 2 3
Functionality No awardable There are There are minor There are no errors
content significant errors errors in logic, in logic, leading to
in logic, leading to leading to an overall an overall solution
an overall solution solution that is not that is fully
that is non- completely functional.
functional. functional.
Accuracy of No awardable Notation follows a Notation follows a Notation follows a
Notation content broadly recognisable recognisable
unrecognisable convention which is convention and is
convention that is broadly discernible applied consistently
applied but is applied throughout.
inconsistently, inconsistently.

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


although aspects
of it are
discernible.
Efficiency, No awardable There are Techniques have Techniques have
Appropriateness, content significant errors been selected and been selected and
and Accuracy of in the selection used with some used accurately
Solution and accurate use accuracy, although and appropriately
of appropriate the techniques may throughout to
techniques. not be the most demonstrate an
appropriate. efficient solution.

There are a maximum of 3 marks for functionality.

Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
There are a maximum of 3 marks for accuracy of notation.
There are a maximum of 3 marks for efficiency, appropriateness, and accuracy of solution.
(9)
Each row is awarded independently.

87
Question 11 – Pseudo-code example:

# Keep asking for input until user wants to start race


RECEIVE key FROM (CHARACTER) KEYBOARD
WHILE key <> 'y' DO
SEND "Please try again. Press y to start countdown" TO DISPLAY
RECEIVE key FROM (CHARACTER) KEYBOARD
END WHILE

IF countGridBreaks() = 0 THEN
SET red TO false
SET amber1 TO true
wait()
IF countGridBreaks() = 0 THEN
SET amber1 TO false
SET amber2 TO true
wait()
IF countGridBreaks() = 0 THEN
SET amber2 TO false
SET green TO true
ELSE
stopRace()
ENDIF
ELSE
stopRace()
ENDIF
ELSE
stopRace ()
ENDIF

88 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Pearson Edexcel Level 1/Level 2 GCSE (9–1)

Computer Science
Programming project

Sample material for first teaching September 2016


Project brief
Time: 20 hours available

Instructions to teachers
• Students
– Python
should use one of the following programming languages:

– Java
– Pascal/Object Pascal
– Visual Basic.NET

••
– C-derived languages.
You must adhere to the instructions as specified in the specification


Internet access is allowed.
The materials submitted must include:
– evidence of the development of the solution
– the program code including any necessary solution files
– a completed programming project authentication form – available in the
specification – see Appendix 3
– a completed Head of centre declaration form which should be signed by the
Head – available in the specification – see Appendix 4.

Information to students
• The work you submit must be your own.

Turn over

S49770A
©2016 Pearson Education Ltd.

1/1/1/1/1
*S49770A*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 89
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Weather station
A team of university weather researchers has permission to use computer-controlled
drones to monitor the climate of the local area. There are five drones in total that fly over
a local area. Each drone records the day and time a reading is taken, temperature, wind
speed, and location. This data is sent back to the researchers at the local weather station.
The data is stored as a text file.
Sample data file for Drone 1

Temperature Wind speed Location


Day Time
(°C) (mph) (six-figure grid reference)

Monday 08:00 6.2 7 207834

Monday 08:15 6.1 7 205834

Monday 08:30 6.8 6 204835

Monday 09:00 7.3 6 204837

Tuesday 08:00 6.3 6 204839

Tuesday 08:15 6.8 7 203840

Tuesday 08:30 7.2 5 202841

Tuesday 09:00 7.5 6 204837

Further data is kept for each day for the rest of the week.
The researchers need to be able to access the temperature and wind-speed data for
different time periods and locations. They want to use this data to calculate the average
temperature, the average wind speed, and the temperature range over different time
periods and locations.
The researchers need a computer program to be written to allow for this to happen.
The program will enable them to read and interpret data to provide an accurate
understanding of weather conditions in the local area over different time periods.
Your task is to analyse this problem and to design, implement, test and evaluate the
solution.

2 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


90 S49770A
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
The written report
Your written report is evidence of the work you have done. The report should contain the
details mentioned below for each stage of the task. The marks available for each stage
are also shown below.

Stage 1 Analysis
You should include a short introduction summarising the overall problem. List each of
the requirements of the problem in the form of text or detailed bullet points.
The problem should be broken down into sub-problems. You should give a short
description of what each of the sub-problems will do and a short explanation of why you
broke down the problem in this way.

Stage 2 Design
The algorithm
This section of your report should begin with your algorithm. You should show how the
sub-problems link together (if appropriate). You should include inputs, processes and
outputs, and the programming constructs that you will use when you produce your
program. Finally, you should show how your algorithm meets the requirements.
Test strategy and initial test plan
This section of your report should include your test strategy and the initial test plan that
must be completed before you start the implementation stage. It is recommended that
you use the following table to produce your initial test plan. Your teacher must see the
test plan before you begin to develop your program code.

Test no Purpose of Test data Expected


the test result

Stage 3 Implementation
Copy and paste your program code into this part of your report. Include screenshots to
show examples of how you debugged your program.

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 3


S49770A 91
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
Stage 4 Testing, Refining and Evaluation
Your completed test table should go in this section of your report. You may need to
change the program in response to the results that you get from your test plan and add
more tests to your table.

Test no Purpose of Test data Expected Actual Action needed/


the test result result comments

You might have thought of refinements that you added to your program as you were
implementing it. These should be documented as additions to your design and described
in your program using comments. You should describe the refinements you identified
and explain why they were needed. If you implemented these refinements and tested
them, then the tests should be included in your table.
Finally, you should evaluate your project by explaining how your project meets each of
the requirements that you identified in the analysis stage of your project.

4 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


92 S49770A
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Pearson Edexcel Level 1/Level 2 GCSE (9–1)

Computer Science
Component 2 and the Programming Project

Sample assessment material for first teaching Paper Reference

September 2016 1CP1/02


Pseudocode command set

Do not return this resource booklet with the question paper.

Turn over

S50557A
©2016 Pearson Education Ltd.

1/1/1/1/1
*S50557A*
Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 93
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Pseudocode command set
Questions in the written examination that involve code will use this pseudocode for
clarity and consistency. However, students may answer questions using any valid method.
Data types
INTEGER
REAL
BOOLEAN
CHARACTER
Type coercion
Type coercion is automatic if indicated by context. For example 3 + 8.25 = 11.25
(integer + real = real)
Mixed mode arithmetic is coerced like this:

INTEGER REAL

INTEGER INTEGER REAL

REAL REAL REAL

Coercion can be made explicit. For example, RECEIVE age FROM (INTEGER) KEYBOARD
assumes that the input from the keyboard is interpreted as an INTEGER, not a STRING.
Constants
The value of constants can only ever be set once. They are identified by the keyword
CONST. Two examples of using a constant are shown.
CONST REAL PI
SET PI TO 3.14159
SET circumference TO radius * PI * 2
Data structures
ARRAY
STRING
Indices start at zero (0) for all data structures.
All data structures have an append operator, indicated by &.
Using & with a STRING and a non-STRING will coerce to STRING. For example, SEND ‘Fred’
& age TO DISPLAY, will display a single STRING of ‘Fred18’.

2 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


94 S50557A
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Identifiers
Identifiers are sequences of letters, digits and ‘_’, starting with a letter, for example:
MyValue, myValue, My_Value, Counter2
Functions
LENGTH()
For data structures consisting of an array or string.
RANDOM(n)
This generates a random number from 0 to n.
Comments
Comments are indicated by the # symbol, followed by any text.
A comment can be on a line by itself or at the end of a line.
Devices
Use of KEYBOARD and DISPLAY are suitable for input and output.
Additional devices may be required, but their function will be obvious from the context.
For example, CARD_READER and MOTOR are two such devices.
Notes
In the following pseudocode, the < > indicates where expressions or values need to be
supplied. The < > symbols are not part of the pseudocode.

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 3


S50557A 95
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
Variables and arrays
Syntax Explanation of syntax Example

SET Counter TO 0
SET Variable TO <value> Assigns a value to a variable.
SET MyString TO ‘Hello world’

Computes the value of an


SET Sum TO Score + 10
SET Variable TO <expression> expression and assigns to
SET Size to LENGTH(Word)
a variable.

Assigns a value to an element SET ArrayClass[1] TO ‘Ann’


SET Array[index] TO <value>
of a one-dimensional array. SET ArrayMarks[3]TO 56

Initialises a one-dimensional
SET Array TO [<value>, …] SET ArrayValues TO [1, 2, 3, 4, 5]
array with a set of values.

SET Array [RowIndex, Assigns a value to an element


SET ArrayClassMarks[2,4] TO 92
ColumnIndex] TO <value> of a two dimensional array.

Selection
Syntax Explanation of syntax Example
IF <expression> THEN IF Answer = 10 THEN
If <expression> is true then
<command> SET Score TO Score + 1
command is executed.
END IF END IF
IF <expression> THEN IF Answer = ‘correct’ THEN
If <expression> is true then first
<command> SEND ‘Well done’ TO DISPLAY
<command> is executed,
ELSE ELSE
otherwise second
<command> SEND ‘Try again’ TO DISPLAY
<command> is executed.
END IF END IF

4 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


96 S50557A
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Repetition
Syntax Explanation of syntax Example
WHILE <condition> DO Pre-conditioned loop. Executes WHILE Flag = 0 DO
<command> <command> whilst SEND ‘All well’ TO DISPLAY
END WHILE <condition> is true. END WHILE
Post-conditioned loop.
REPEAT Executes REPEAT
<command> <command> until <condition> SET Go TO Go + 1
UNTIL <expression> is true. The loop must execute UNTIL Go = 10
at least once.
Count controlled loop. The
REPEAT <expression> TIMES REPEAT 100-Number TIMES
number of times <command>
<command> SEND ‘*’ TO DISPLAY
is executed is determined by
END REPEAT END REPEAT
the expression.
FOR <id> FROM <expression>
FOR Index FROM 1 TO 10 DO
TO Count controlled loop. Executes
SEND ArrayNumbers[Index]
<expression> DO <command> a fixed number of
TO DISPLAY
<command> times.
END FOR
END FOR
FOR <id> FROM <expression>
TO FOR Index FROM 1 TO 500 STEP
<expression> STEP Count controlled loop using 25 DO
<expression> DO a step. SEND Index TO DISPLAY
<command> END FOR
END FOR
SET WordsArray TO [‘The’, ‘Sky’,
‘is’, ‘grey’]
FOR EACH <id> FROM
SET Sentence to ‘‘
<expression> DO Count controlled loop. Executes
FOR EACH Word FROM
<command> for each element of an array.
WordsUArray DO
END FOREACH
SET Sentence TO Sentence &
Word & ‘ ‘

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 5


S50557A 97
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Turn over
Input/output
Syntax Explanation of syntax Example

SEND ‘Have a good day.’ TO


SEND <expression> TO DISPLAY Sends output to the screen.
DISPLAY

RECEIVE Name FROM (STRING)


KEYBOARD
RECEIVE <identifier> FROM
RECEIVE LengthOfJourney
(type) Reads input of specified type.
FROM (INTEGER) CARD_READER
<device>
RECEIVE YesNo FROM
(CHARACTER) CARD_READER

File handling
Syntax Explanation of syntax Example
Reads in a record from a <file>
and assigns to a <variable>.
READ <File> <record> READ MyFile.doc Record
Each READ statement reads a
record from the file.
Writes a record to a file.
WRITE MyFile.doc Answer1,
WRITE <File> <record> Each WRITE statement writes a
Answer2, ‘xyz 01’
record to the file.

Subprograms
Syntax Explanation of syntax Example
PROCEDURE CalculateAverage
PROCEDURE <id> (<parameter>,
(Mark1, Mark2, Mark3)
…)
BEGIN PROCEDURE
BEGIN PROCEDURE Defines a procedure. SET Avg to (Mark1 + Mark2 +
<command>
Mark3)/3
END PROCEDURE
END PROCEDURE
FUNCTION AddMarks (Mark1,
FUNCTION <id> (<parameter>,
Mark2, Mark3)
…)
BEGIN FUNCTION
BEGIN FUNCTION
Defines a function. SET Total to (Mark1 + Mark2 +
<command>
Mark3)/3
RETURN <expression>
RETURN Total
END FUNCTION
END FUNCTION
Calls a procedure or a
<id> (<parameter>, …) Add (FirstMark, SecondMark)
function.

6 Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science


98 S50557A
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
Arithmetic operators
Symbol Description
+ Add
- Subtract
/ Divide
* Multiply
^ Exponent
MOD Modulo
DIV Integer division

Relational operators
Symbol Description
= equal to
<> not equal to
> greater than
>= greater than or equal to
< less than
<= less than or equal to

Logical operators
Symbol Description
Returns true if both conditions
AND
are true.
Returns true if any of the
OR
conditions are true.
Reverses the outcome of the
NOT expression; true becomes false,
false becomes true.

Pearson Edexcel Level 1/Level 2 GCSE (9-1) in Computer Science 7


S50557A 99
Sample assessment materials (SAMs) – Issue 5.0 – August 2018 © Pearson Education Limited 2018
For information about Pearson Qualifications, including Pearson Edexcel,
BTEC and LCCI qualifications visit qualifications.pearson.com

Edexcel and BTEC are registered trademarks of Pearson Education Limited

Pearson Education Limited. Registered in England and Wales No. 872828


Registered Office: 80 Strand, London WC2R 0RL

VAT Reg No GB 278 537121

You might also like