AQA GCSE

AQA GCSE Computer Science Paper 1 Python

31 free questions · No sign-up required to browse

AQA General Tier Exam-style past paper with complete mark schemes, hints, AI assistance and detailed explanations.

31
Questions
Medium
Difficulty
54%
Pass mark

Difficulty breakdown

Easy(11)
Medium(13)
Hard(6)

Sample questions

Q01.1Easy2 marks

Figure 1 shows an algorithm, represented using pseudo-code, which assigns a different value to four variables.

Figure 1
country ← 'United States of America'
state ← 'California'
city ← 'San Francisco'
landmark ← 'Alcatraz Island'

Define the term algorithm.

View question with guidance →
Q01.2Easy1 mark

The variable x is assigned a value using the statement:
x ← LEN(state)

Using Figure 1, what is the value of x?

View question with guidance →
Q01.3Easy1 mark

What is the result of concatenating the contents of the variables city and landmark in Figure 1?

View question with guidance →
Q01.5Easy1 mark

The subroutine POSITION finds the first position of a character in a string.
For example, POSITION('Computing', 'p') would return 3.

The variable z is assigned a value using the statement:
z ← POSITION(landmark, 't')

Using Figure 1, what value is assigned to z?
(Note: The paper states to assume 0-based indexing unless specified otherwise.)

View question with guidance →
Q02.1Easy1 mark

Figure 2 shows an algorithm that uses integer division which has been represented using pseudo-code. Line numbers are included but are not part of the algorithm.

Figure 2
1 again ← True
2 WHILE again = True
3 a ← USERINPUT
4 IF a > 0 THEN
5 counter ← 0
6 WHILE a > 0
7 a ← a DIV 3
8 counter ← counter + 1
9 ENDWHILE
10 ELSE
11 again ← False
12 ENDIF
13 OUTPUT a
14 ENDWHILE
Where is iteration first used in the algorithm in Figure 2?

View question with guidance →

Ready to Practice the full exam?

All 31 questions with worked answers, mark schemes, and AI tutoring.

All questions (30)

Free to browse · no sign-up required
Q01.1Figure 1 shows an algorithm, represented using pseudo-code, which assigns a different value to four variables. **Fig...EasyQ01.2The variable `x` is assigned a value using the statement: `x ← LEN(state)` Using Figure 1, what is the value of `x`?EasyQ01.3What is the result of concatenating the contents of the variables `city` and `landmark` in Figure 1?EasyQ01.5The subroutine `POSITION` finds the first position of a character in a string. For example, `POSITION('Computing', 'p...EasyQ02.1Figure 2 shows an algorithm that uses integer division which has been represented using pseudo-code. Line numbers are...EasyQ02.2In the algorithm in Figure 2, what will be output when the user input is 10?MediumQ02.3In the algorithm in Figure 2, what is the largest possible value of the variable `counter` when the user input is 36?MediumQ03Explain **one** advantage of the structured approach to programming.EasyQ04.1Figure 3 shows a program written in Python that calculates the area of a rectangle or the volume of a box from the us...MediumQ04.2Describe **one** way that the program in Figure 3 could be made more robust.EasyQ05Figure 4 shows an algorithm presented as a flowchart. Complete the trace table for the algorithm. You may not need to...MediumQ06Figure 5 shows an algorithm for a simple authentication routine. Parts of the algorithm are missing and have been rep...MediumQ07A theme park charges £15 per person for a daily ticket. If there are six or more people in a group, the group is give...MediumQ08A list of numbers `[5, 2, 8, 1, 9, 4]` needs to be sorted using the merge sort algorithm. Explain how the merge sort ...MediumQ09.1Figure 8 shows an algorithm that uses a RECORD data structure for storing information about a film. **Figure 8** REC...EasyQ09.2Which assignment statement changes the year the film *Hulk* was made to 2003?EasyQ09.3What should the label L1 in Figure 8 be replaced by?MediumQ09.4Write a pseudo-code statement that updates the `antMan` record to show that the film is currently being shown at the ...EasyQ10.1Figure 9 shows an algorithm, represented in pseudo-code, used to display students' test scores. The algorithm does no...HardQ10.2How could the error in the algorithm in Figure 9 be corrected?MediumQ11.1Figure 10 shows part of an algorithm that has been written in pseudo-code. There is an error in the algorithm. The a...HardQ11.2The algorithm in Figure 10 contains a logic error on line 11. Describe how the error on line 11 can be corrected.MediumQ12.1Figure 11 shows a binary search algorithm that has been programmed in Python. **Figure 11** python animals = ["cat",...MediumQ12.2Figure 12 shows a line of Python code that creates a list of fruit names. **Figure 12** python fruits = ["banana", "...HardQ12.3State why a binary search cannot be used on the list `fruits`.EasyQ12.4Figure 13 shows an algorithm, represented using pseudo-code, that should display currency names in reverse alphabetic...MediumQ13A programmer is writing a game using a 3x3 grid. A square on the grid is referred to by a letter (A, B, C) and a numb...HardQ14Figure 16 shows an incomplete algorithm, represented using pseudo-code, designed to output the highest or lowest resu...MediumQ15A group of people have a meal in a restaurant. Instead of one person paying for the whole meal, each person will pay ...HardQ16Question 16 is about a dice game played against a computer. The aim of the game is to get as close to a score of 21 a...Hard