AQA GCSE Computer Science June 2025 Paper 1, Question 3: the netball coaching cost
AQA 8525 June 2025 Paper 1, Question 3: write a Python program that charges 20 pounds plus 5 per student up to 15, 3 per student above that, and a flat 100 for more than 25. A model answer, the elif order trap, the eight marks explained, and the program to run.
Question 3 of the AQA GCSE Computer Science Paper 1 sat on 12 May 2025 (8525/1B, the Python paper) is an 8 mark "write a program" question with three price bands. The maths is easy. The mark that gets lost is for putting the bands in an order that works.
We do not copy the exam paper here. Open it beside this page: AQA June 2025 Paper 1B question paper (PDF). When you have finished, check the mark scheme too.
The question in short
A coaching session costs:
- a booking fee of £20, plus £5 a student if there are 15 students or fewer;
- a booking fee of £20, plus £3 a student if there are more than 15;
- a flat £100, with no other charges, if there are more than 25.
The program gets the number of students and outputs the total cost.
A model answer
students = int(input("How many students? "))
if students > 25:
total = 100
elif students > 15:
total = 20 + 3 * students
else:
total = 20 + 5 * students
print(total)
The order trap
Every number above 25 is also above 15. If you test students > 15 first, a group of 30 is caught there, charged £110, and never reaches the flat rate. The mark scheme shows exactly that answer as its 7 mark example.
Two ways to get it right: test the biggest band first, as above, or give the middle band both ends: students > 15 and students <= 25.
Test it
| Students | Band | Cost |
|---|---|---|
| 10 | 15 or fewer | 20 + 50 = 70 |
| 15 | 15 or fewer (boundary) | 20 + 75 = 95 |
| 16 | more than 15 | 20 + 48 = 68 |
| 25 | more than 15 (boundary) | 20 + 75 = 95 |
| 26 | more than 25 | 100 |
Where the eight marks are
Two are for design: meaningful variable names, and selection that uses the number of students.
Six are for a program that works: the input stored; one correct condition; all the conditions correct; one correct calculation in the right branch; all three calculations correct; and one total output, in a place that covers every branch.
Any error caps you at 7.
Where the marks are lost
- The middle band swallowing the top one. See above.
>= 15. 15 students is still in the cheaper band. "More than 15" starts at 16.- Adding the booking fee to the flat rate. For more than 25 it is £100 and nothing else.
"25"in quotation marks, or£20in the sum. Numbers have neither.- Three prints, or none. Work out
totalin each branch and print it once at the end.
Run it
Type a number of students. The robot drives 1 cm for every £2 of the cost.
The program
from bugbot import *
connect()
students = int(input("How many students? "))
if students > 25:
total = 100
elif students > 15:
total = 20 + 3 * students
else:
total = 20 + 5 * students
print(total)
forward(60, distance=min(total / 2, 60))
Questions
What is the answer to AQA GCSE Computer Science 2025 Paper 1 Question 3?
Input the number of students as an integer. If it is more than 25 the total is 100. Else if it is more than 15 the total is 20 + 3 * students. Otherwise it is 20 + 5 * students. Print the total.
In what order should I test overlapping ranges?
From the most extreme inwards: test the largest band first, then the next, so that each elif only sees the values the earlier tests let through. Or give every band both of its limits.
Why is 16 students cheaper than 15?
Because the price per student drops from 5 to 3 at that point: 20 + 3 x 16 is 68, and 20 + 5 x 15 is 95. Testing both sides of a boundary shows up surprises like this.
More from this paper
- Question 4: Validate a name by length until it is accepted, test data, and a username flowchart 13 marks
- Question 5: Data types, and five inputs rewritten as a loop with one 8 marks
- Question 10: Records, and the smallest value in an array without min or sort 8 marks
- Question 11: Trace findLetter, then write the word game that calls it 14 marks
Every AQA 8525 question we have worked · Guide: Logic gates and truth tables explained
Learn it step by step
- F2.3 else, elif and Boolean operators Decisions and loops
- F2.4 Nested selection and match Decisions and loops
- F13.4 Programming questions Exam preparation
This is our own explanation of a published exam question. It is not written or endorsed by AQA, and the question paper and mark scheme remain AQA's copyright. Read them on AQA's site with the links on this page.