






















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
AQA GCSE COMPUTER SCIENCE Paper 1 Computational thinking and programming skills – Python (8525/1B) Combined Question Paper and Mark Scheme
Typology: Exams
1 / 62
This page cannot be seen from the preview
Don't miss anything!























































Please write clearly in block capitals. Centre number Candidate number Surname Forename(s) Candidate signature I declare this is my own work. For the multiple-choice questions, completely fill in the lozenge alongside the appropriate answer. CORRECT METHOD WRONG METHODS If you want to change your answer you must cross out your original answer as shown. If you wish to return to an answer previously crossed out, ring the answer you now wish to select as shown.
COMPUTER SCIENCE
Materials
this book. Write the question number against your answer(s).
to be marked.
The total number of marks available for this paper is 90.
For Examiner’s Use Question Mark 1 2 3 4 5 6 7 8 – 9 10 11 TOTAL
Do not write
outside the
for more: tyrionpapers.com
Answer all questions. box
Figure 1 shows a program written in Python.
Figure 1
Where is an arithmetic operation first used in the program in Figure 1?
Shade one lozenge.
A Line number 1
[1 mark]
B Line number 5
C Line number 6
D Line number 8
. Which of the following is a false statement about the program in Figure 1?
Shade one lozenge.
[1 mark]
A This program contains a comment.
B This program uses assignment.
C This program uses concatenation.
D This program uses iteration.
Do not write
outside the
for more: tyrionpapers.com
A coffee shop has a loyalty scheme which rewards customers for buying drinks.
The customer gets one stamp on their loyalty card for each individual drink they buy.
pastry).
The Python program shown in Figure 2 should display whether the customer gets a
free biscuit, pastry, cake or nothing free for their first 20 drinks.
Some parts of the program have been replaced with the labels to.
Figure 2
box
State the Python code that should be written in place of the labels in the program
written in Figure 2.
[3 marks]
Do not write
outside the
for more: tyrionpapers.com
. The coffee shop wants to work out the total value of the free biscuits, pastries and
cakes given out each day.
Write a Python program to get the number of free biscuits, pastries and cakes, and
calculate the total value for the day.
Your program must:
You should use indentation as appropriate, meaningful variable name(s) and Python
syntax in your answer.
box
The answer grid below contains vertical lines to help you indent your code.
[4 marks]
Turn over ►
Do not write
outside the
for more: tyrionpapers.com
Turn over ►
box
Do not write
outside the
for more: tyrionpapers.com
A programmer is developing a system to register users for an app. The program
needs to validate the first name of the user.
box
. Identify the purpose of validation.
Shade one lozenge.
A Checks that the user is human
[1 mark]
B Checks that the user is who they say they are
C Checks that the input is a name
D Checks that the input is reasonable
. Write a Python program to check the user’s first name.
Your program should:
characters:
You should use indentation as appropriate, meaningful variable name(s) and Python
syntax in your answer.
The answer grid below contains vertical lines to help you indent your code.
[6 marks]
Do not write
outside the
for more: tyrionpapers.com
. Which of the following statements best describes boundary test data?
Shade one lozenge.
A Data that is not of the allowed data type
[1 mark]
box
B Data that is at the limits of the allowed range
C Data that is expected by the program
D Data that will cause a syntax error
. The programmer has started planning the tests that will be used to check the program
is working correctly.
The program should:
characters:
The start of the test plan is shown in Figure 3.
Figure 3
Test
number
Test data
Type of
test data
Expected result
Normal
2 Boundary
State the number of characters that a string used for test number 2 in Figure 3 could
contain.
[1 mark]
. Normal and boundary are two types of test data.
State one type of test data that has not been used in Figure 3.
[1 mark]
Do not write
outside the
for more: tyrionpapers.com
. 6 A programmer is designing an algorithm to generate usernames for users.
The algorithm should:
o if their first name has more than three characters, their username will consist of
the first three characters of their first name followed by their last name
o if their first name has three or fewer characters, their username will consist of
their full first name followed by their last name
Figure 4 contains the statements required to implement a version of this algorithm.
Figure 4
Using the labels ( to ) shown in Figure 4 , complete the flowchart to implement
the algorithm.
box
[3 marks]
Do not write
outside the
for more: tyrionpapers.com
The Python program in Figure 5 gets five numbers and outputs the sum of those
numbers.
Figure 5
box
. An integer data type is used in the program in Figure 5.
Describe what is meant by a data type.
[1 mark]
integer data type.
. Explain why these variables do not have a string data type.
[1 mark]
The program in Figure 5 needs to be changed to use numbers with a fractional part
(a real number).
State a data type in Python that should be used.
[1 mark]
Do not write
outside the
for more: tyrionpapers.com
. Rewrite the program in Figure 5 so that it achieves the same result but uses an
Your answer must be written in Python.
You should use indentation as appropriate, meaningful variable name(s) and Python
syntax in your answer.
box
The answer grid below contains vertical lines to help you indent your code.
[5 marks]
Turn over ►
Do not write
outside the
for more: tyrionpapers.com
A programmer decides to use a merge sort algorithm to sort the same values shown
in Figure 6.
Complete the diagram to show how the merge part of the merge sort algorithm is
applied to Figure 6.
box
[3 marks]
Question 6 continues on the next page
Turn over ►
Do not write
outside the
for more: tyrionpapers.com
. State one advantage and one disadvantage of a bubble sort compared to a merge
sort.
box
[2 marks]
Advantage
Disadvantage
. The programmer has an array of 2500 numbers, stored in ascending order (smallest
to largest).
The programmer needs to write a program to search for a value in the array.
Explain why a binary search is better than a linear search for this array.
[2 marks]
Do not write
outside the
for more: tyrionpapers.com
. 4 State the identifier for the parameter in Figure 7.
[1 mark]
box
State two characteristics of the structured approach to programming.
[2 marks]
Turn over for the next question
Turn over ►
Do not write
outside the
for more: tyrionpapers.com
Figure 8 shows an algorithm represented using pseudo-code.
Figure 8
box
. Complete the trace table for the algorithm shown in Figure 8.
You may not need to use all the rows in the table.
[5 marks]