AQA GCSE Computer Science Paper 1 (1B), June 2025: Question 3
8 marks · Hard difficulty · Programming
Write a Python program to calculate the total cost of a netball coaching session based on the number of students entered by the user.
Practise this questionQuestion
Question text
03 Write a Python program that calculates the total cost of a netball coaching session for
a group of students.
The total cost is calculated as follows:
• A booking fee of £20 plus:
o £5 per student if there are 15 students or fewer
o £3 per student if there are more than 15 students
• If there are more than 25 students, a booking fee of £100 and no other charges.
Your program should:
• get the user to enter the number of students
• output the total cost of the session.
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.
[8 marks]
Mark scheme
Show the mark scheme
Total
Question Part Marking guidance
marks
03 2 marks for AO3 (design) and 6 marks for AO3 (program) 8
Program Design
Note that AO3 (design) marks are for selecting appropriate techniques to
use to solve the problem, so should be credited whether the syntax of
programming language statements is correct or not and regardless of
whether the solution works.
Mark A for using meaningful variable names throughout;
Mark B for the use of a selection construct using the number of students;
Program Logic
Mark C for using user input and storing the result in a variable correctly for
the number of students;
Mark D for one correct Boolean condition to check number of students;
A. if the only error is quotes included around numeric values;
Mark E for correctly checking the number of students under all required
conditions; R. if any quotes included around numeric values;
Mark F for one expression that calculates total correctly, linked to the
condition for the intended pathway;
Mark G for expressions that calculate total correctly for each of the three
pathways;
Mark H for outputting only one total in an appropriate location that covers
all included pathways;
A. if 100 is output appropriately as part of a literal string under the correct
condition;
DPT use of £ sign in calculation or value assigned to variable
DPT for quotes around numbers
I. Case
I. Messages or no messages with input and output statements
I. Gaps/spaces throughout the code, except where to do so would explicitly
alter the logic of the code in a way that makes it incorrect.
Maximum 7 marks if any errors in code
Note to examiners
In C#/VB.NET examples, explicit variable declarations are not shown. Refer
to the specific language type issues section of the appropriate Marking
Guidance document. Any correct variable declarations in student answers
should be accepted.
C# Example 1 (fully correct)
All design marks are achieved (Marks A and B)
students = Convert.ToInt32(Console.ReadLine()); C
if (students > 25) { D
total = 100; F
}
else if (students > 15) { E
total = 20 + (3 * students); Part G
}
else {
total = 20 + (5 * students); Part G
}
Console.WriteLine(total); H
A. Write in place of WriteLine
I. missing Console.
Python Example 1 (fully correct)
All design marks are achieved (Marks A and B)
students = int(input()) C
if students > 25: D
total = 100 F
elif students > 15: E
total = 20 + (3 * students) Part G
else:
total = 20 + (5 * students) Part G
print(total) H
Python Example 2 (fully correct)
All design marks are achieved (Marks A and B)
students = int(input()) C
if students <= 15: D
print(20 + 5 * students) F
elif students > 15 and students <= 25: E
print(20 + 3 * students) Part G
else:
print(100) Part G
Python Example 3 (7 marks)
All design marks are achieved (Marks A and B)
No Mark E because > 25 is caught by students > 15 condition.
students = int(input()) C
if students <= 15: D
total = 20 + (5 * students) F
elif students > 15: Part E
total = 20 + (3 * students) Part G
elif students > 25: Part E
total = 100 Part G
print(total) H
VB.NET Example 1 (fully correct)
All design marks are achieved (Marks A and B)
students = Console.ReadLine() C
If students > 25 Then D
total = 100 F
ElseIf students > 15 Then Part E
total = 20 + (3 * students) Part G
Else Part E
total = 20 + (5 * students) Part G
End If
Console.WriteLine(total) H
A. Write in place of WriteLine
I. missing Console.
VB.NET Example 2 (7 Marks)
All design marks are achieved (Marks A and B)
No Mark E because > 25 is caught by students > 15 condition.
total = 0
students = Console.ReadLine() C
If students <= 15 Then D
total = 20 + (5 * students) F
ElseIf students > 15 Then Part E
total = 20 + (3 * students) Part G
ElseIf students > 25 Then Part E
total = 100 Part G
End If
Console.WriteLine(total) H
A. Write in place of WriteLine
I. missing Console.
How to answer it
Netball Session Cost Calculator (Python Algorithm)
AQA GCSE Computer Science • Paper 1 / Paper 2 • 8 MarksWhat this question tests
This 8-mark free-response programming question assesses your ability to design and write robust procedural code using core constructs:
- Taking input and type casting (converting standard string input into an integer).
- Multi-branch selection ( if ... elif ... else ) to evaluate multiple mutually exclusive pathways.
- Logical sequencing & boundary checking (avoiding logic traps where broader conditions accidentally catch stricter ones).
- Arithmetic operations in Python (order of operations, pricing formulas).
- Formatting output cleanly to report the final total once.
Question 03 Analysis & Mark Breakdown
Full breakdown of the 8 marks across Design (AO3) and Logic (AO3)
💡 How the 8 Marks are Awarded
| Category | Mark | Requirement |
|---|---|---|
| Design (2 marks) | Mark A | Using meaningful variable names throughout (e.g. students , total , cost ). |
| Mark B | Using a selection construct ( if / elif / else ) that checks the number of students. | |
| Logic & Implementation (6 marks) | Mark C | Using user input, casting it correctly to an integer, and storing it in a variable. |
| Mark D | Writing at least one correct Boolean condition checking the number of students. | |
| Mark E | Correctly checking the number of students under all required conditions without logic conflicts. | |
| Mark F | Correct arithmetic expression to calculate the total on at least one pathway. | |
| Mark G | Correct arithmetic calculations for all three pricing pathways. | |
| Mark H | Outputting only one total value covering all included pathways. |
Pricing Model Breakdown
Step-by-step logic rules from the question specification
📐 Pathway Rules & Mathematical Calculations
- Pathway 1: High Attendance (> 25 students)
• Fixed flat rate booking fee of £100 with no per-person charge.
• Formula: total = 100 - Pathway 2: Medium Attendance (16 to 25 students)
• Base fee of £20 + £3 per student.
• Formula: total = 20 + (3 * students) - Pathway 3: Low Attendance (15 students or fewer)
• Base fee of £20 + £5 per student.
• Formula: total = 20 + (5 * students)
Model Answers (Full 8/8 Marks)
Two standard, examiner-approved Python approaches
✅ Approach 1: Top-Down Logic (Recommended)
Check the largest boundary first so you don't need complex boolean operators like and :
students = int(input("Enter number of students: ")) if students > 25: total = 100 elif students > 15: total = 20 + (3 * students) else: total = 20 + (5 * students) print(total)Why this works: Any value > 25 gets trapped in the first if . The elif only evaluates numbers from 16 to 25. All numbers ≤ 15 drop into else .
✅ Approach 2: Bottom-Up Logic (Compound Conditions)
If you check low numbers first, you must define the middle boundary explicitly:
students = int(input("Enter number of students: ")) if students <= 15: total = 20 + (5 * students) elif students > 15 and students <= 25: total = 20 + (3 * students) else: total = 100 print(total)Notice the explicit and students <= 25 . This prevents inputs > 25 from being incorrectly charged £3 each.
Examiner Advice & Pitfalls to Avoid
Where candidates frequently lose easy marks
🧠 Exam Technique & Best Practice
- Always cast inputs: input() in Python always returns a string. You must use int(input()) to do numeric comparisons (>, <).
- Single Print Statement: It is much cleaner to calculate total inside your branches and write a single print(total) at the very end. This guarantees Mark H.
- Meaningful Identifiers: Name variables clearly (e.g., num_students , total_cost ). Do not use single-letter variables like x or y .
- Use the provided grid lines: AQA provides indentation lines. Align code blocks clearly to avoid indentation syntax penalties.
❌ Common Errors (From the Mark Scheme)
- The Order of Conditions Trap (Loses Mark E): if students <= 15: total = 20 + (5 * students) elif students > 15: # ERROR! total = 20 + (3 * students) elif students > 25: # NEVER REACHED! total = 100 If a student enters 30, it satisfies > 15 , so the code never checks > 25 !
- Quoting numbers: Writing if students > "25": causes a TypeError in Python 3.
- Including currency symbols: Writing total = £20 + (£3 * students) is invalid syntax in Python. Do not write the £ sign in calculations.
Topics
3.2 Programming · 3.2.2 Programming concepts · 3.2.3 Arithmetic operations in a programming language · 3.2.4 Relational operations in a programming language · 3.2.7 Input/output
Question and mark scheme from the AQA GCSE Computer Science examination, Paper 1 (1B), June 2025. QuestionVault is an independent revision resource; questions remain the copyright of the awarding body.