Kramizo
Log inSign up free
AQA GCSE·💻 Computer Science

AQA GCSE Computer Science — Paper 1 (Computational thinking and programming)

90 minutes📊 90 marks📄 Paper 1 (Computational thinking and programming)
📚 Subject revision notes↩ All exam papers
ℹ️ About this paper: This is an exam-board-aligned practice paper written in the style of AQA GCSE — not an official past paper. Use it for timed practice, then check against the mark scheme included below. For official past papers, see the exam board's website.
00:00of 90:00

AQA GCSE Computer Science — Paper 1 (Computational thinking and programming)

Total marks: 90 · Duration: 90 minutes

Instructions to candidates

• Answer all questions in both Section A and Section B. • Write your answers in black ink or black ball-point pen. • You may use an AQA approved calculator. • For Section B extended response questions, you should write your answers in continuous prose where appropriate, ensuring your spelling, punctuation and grammar are accurate. • The marks for questions are shown in brackets. • The maximum mark for this paper is 90.


Paper

Section A — Structured Questions (54 marks)

Question 1

A school library uses a database to store information about books and members.

(a) State what is meant by the term primary key.

(2 marks)

(b) The library database contains the following two tables:

Books table:

BookID Title Author Genre OnLoan
B001 To Kill a Mockingbird Harper Lee Fiction TRUE
B002 A Brief History of Time Stephen Hawking Science FALSE
B003 1984 George Orwell Fiction TRUE

Members table:

MemberID FirstName Surname YearGroup
M101 Sarah Johnson 11
M102 James Smith 10
M103 Amira Khan 11

Write an SQL query to display the Title and Author of all books where the Genre is 'Fiction' and the book is currently on loan.

(3 marks)

(c) The library wants to track which member has borrowed which book.

Explain why a third table would be needed to implement this relationship properly.

(3 marks)


Question 2

A programmer is developing a game where players must guess a secret number between 1 and 100.

The following algorithm shows part of the game logic:

01  secret = random(1, 100)
02  attempts = 0
03  maxAttempts = 7
04  guessed = False
05  
06  WHILE guessed == False AND attempts < maxAttempts
07      guess = input("Enter your guess: ")
08      attempts = attempts + 1
09      
10      IF guess == secret THEN
11          OUTPUT "Correct! You win!"
12          guessed = True
13      ELSE
14          IF guess < secret THEN
15              OUTPUT "Too low"
16          ELSE
17              OUTPUT "Too high"
18          ENDIF
19      ENDIF
20  ENDWHILE
21  
22  IF guessed == False THEN
23      OUTPUT "Game over. The number was " + secret
24  ENDIF

(a) Identify the data structure used on line 01 to generate the secret number.

(1 mark)

(b) State the purpose of the variable attempts in this algorithm.

(1 mark)

(c) Explain why a WHILE loop is more appropriate than a FOR loop in this algorithm.

(2 marks)

(d) The programmer wants to add a feature that stores the player's name and their best score (fewest attempts) in a text file called "highscores.txt".

Write pseudocode to:

  • Ask the user for their name
  • Open the file in append mode
  • Write the name and number of attempts to the file
  • Close the file

(4 marks)


Question 3

A smartphone app tracks daily step counts for users.

(a) The app stores each day's step count in a one-dimensional array called steps. The array has 7 elements, representing Monday to Sunday.

The following pseudocode calculates the total steps for the week:

total = 0
FOR i = 0 TO 6
    total = total + steps[i]
ENDFOR
OUTPUT total

A programmer suggests using a two-dimensional array to store step data for multiple weeks.

Describe how a two-dimensional array could be used to store 4 weeks of daily step data.

(3 marks)

(b) The app uses the following function to determine if a user has met their daily target:

def checkTarget(steps, target):
    if steps >= target:
        return True
    else:
        return False

(i) State the data type that this function returns.

(1 mark)

(ii) Explain one advantage of using a function to perform this check rather than writing the code repeatedly throughout the program.

(2 marks)

(c) The app developer wants to implement a linear search algorithm to find the first day in the week where the user exceeded 10,000 steps.

Complete the pseudocode below to implement this linear search:

steps = [8500, 9200, 12000, 11500, 7800, 13000, 9500]
target = 10000
found = False
position = -1

FOR i = 0 TO 6
    IF ______________ THEN
        position = ______________
        ______________
    ENDIF
ENDFOR

IF position == -1 THEN
    OUTPUT "Target not reached any day"
ELSE
    OUTPUT "Target first reached on day " + ______________
ENDIF

(4 marks)


Question 4

Binary and hexadecimal are number systems used in computing.

(a) Convert the binary number 1011 0110 to:

(i) Denary (decimal)

(2 marks)

(ii) Hexadecimal

(2 marks)

(b) A computer uses an 8-bit two's complement system to represent signed integers.

(i) State the range of denary values that can be represented using 8-bit two's complement.

(2 marks)

(ii) Show how the denary number -23 would be represented in 8-bit two's complement binary.

(3 marks)

(c) Explain why hexadecimal is often used by programmers instead of binary when representing memory addresses or colour codes.

(2 marks)


Question 5

A software company is developing a new application. The development team must choose between different programming paradigms.

(a) Name two programming paradigms.

(2 marks)

(b) The team decides to use object-oriented programming (OOP).

(i) State what is meant by the term encapsulation in object-oriented programming.

(2 marks)

(ii) The program includes a class called BankAccount with the following attributes:

  • accountNumber
  • balance
  • accountHolder

The class includes a method called withdraw(amount) that reduces the balance.

Write a class definition in a programming language of your choice (Python, Java, C# or VB.NET) that includes:

  • The three attributes listed above
  • A constructor method that initialises all three attributes
  • The withdraw(amount) method

(6 marks)

(c) Explain one advantage of using inheritance when developing the bank account system if the company needs to create both 'Savings Account' and 'Current Account' classes.

(2 marks)


Question 6

Computer systems must be protected against various security threats.

(a) Describe what is meant by a brute force attack.

(2 marks)

(b) A company requires employees to create passwords that meet the following criteria:

  • At least 12 characters long
  • Contains uppercase and lowercase letters
  • Contains at least one number
  • Contains at least one special character (!, @, #, etc.)

(i) Explain how these requirements help protect against brute force attacks.

(3 marks)

(ii) The company also implements two-factor authentication.

Explain how two-factor authentication provides additional security beyond just using a strong password.

(2 marks)

(c) Describe the purpose of penetration testing in maintaining system security.

(2 marks)


Section B — Extended Response (36 marks)

Question 7

A national retail company is considering whether to develop a new customer loyalty mobile app. The app would:

  • Track customer purchases in-store and online
  • Store customer personal data including name, address, email, and purchase history
  • Use customer location data to send notifications about nearby store offers
  • Store payment card details for quick checkout
  • Share anonymised shopping data with third-party marketing companies

The company believes the app will increase sales and customer engagement. However, there are concerns about data protection, customer privacy, and potential security vulnerabilities.

Discuss the ethical, legal and security issues the company should consider when developing and operating this customer loyalty app.

You should consider:

  • Data protection legislation and customer rights
  • Security measures needed to protect customer data
  • Ethical concerns about data collection and use
  • The balance between business benefits and customer privacy

(15 marks)


Question 8

Algorithms can be designed using different approaches to solve the same problem. Two important algorithm design approaches are divide and conquer (such as merge sort) and simple iterative approaches (such as bubble sort).

The table below shows the time taken (in milliseconds) for bubble sort and merge sort to sort different-sized lists of numbers:

Number of items Bubble Sort (ms) Merge Sort (ms)
100 5 2
1,000 450 18
10,000 45,000 180
100,000 4,500,000 2,000

A developer needs to create a system that frequently sorts large datasets containing between 50,000 and 200,000 items. The system must provide results quickly to maintain good user experience.

Evaluate which sorting algorithm would be most suitable for this system. Justify your recommendation by referring to:

  • Computational complexity and efficiency
  • The performance data provided
  • The specific requirements of the system
  • Any practical considerations for implementation

(12 marks)

The developer also needs to search through sorted datasets to find specific items.

Compare linear search and binary search algorithms for this purpose, recommending which would be most appropriate for searching sorted datasets.

(9 marks)


📋 Mark Scheme & Sample Answers

Hidden by default — attempt the paper first, then check your work against the examiner-style mark scheme.

⚡ Unlock with Pro
Mark schemes are a Pro feature

Unlock full examiner-style mark schemes and grade-tiered sample answers across every paper.

See Pro pricing →
Finished the paper?

Reveal the mark scheme above, then dive into the topic notes to firm up anything you missed.

📚 Open subject revision notes →