AQA GCSE Computer Science Paper 1, June 2025: question 3

A PrepWise guide to a real paper, with our descriptions and answers. Not made or approved by AQA.

PrepWise guide: AQA GCSE Computer Science Paper 1Question 33 of 11

A netball club charges a £20 booking fee plus £5 per student for a group of up to 15. Where a group has more than 15 students it is £3 per student instead of £5. A group of more than 25 students pays £100 flat and nothing else.

03[8 marks]

Write a program that reads the number of students and prints the session cost under these rules, using meaningful variable names.

See how you would score on Selection (IF Statements)

Our own questions on this topic, marked straight away, so you see what to revise. Free now.

Show model answerHide model answer
number_of_students = int(input("Number of students: "))
if number_of_students <= 15:
   total_cost = 20 + 5 * number_of_students
elif number_of_students <= 25:
   total_cost = 20 + 3 * number_of_students
else:
   total_cost = 100
print("Total cost in pounds:", total_cost)

The tests run from the smallest group upwards, so a group above 25 skips both and reaches else.

8 marks

How the marks are earned

  1. Meaningful variable names are used throughout, such as number_of_students and total_cost (design mark).
  2. A selection structure is used on the number of students (design mark).
  3. The number of students is read from the user and stored in a variable.
  4. At least one correct Boolean condition on the number of students. Quotes round the numbers in this one condition are tolerated.
  5. All the required conditions are checked correctly so each group size reaches its own rule, with no quotes round numbers. A group above 25 must not be caught by the test for more than 15.
  6. One expression gives the total correctly and sits under its own condition.
  7. Expressions give the total correctly for all three pricing routes.
  8. Only one total is output, in a place that covers every route. Printing 100 as a literal under the right condition is accepted. A print in each branch, each under its own condition, is also accepted.
  9. The case of the code is ignored; messages with input and output are optional; gaps are ignored unless they change the logic.
  10. Each of these, a £ sign used inside a calculation or in a value given to a variable, or quotes round numbers, loses one mark only the first time it appears.
  11. If the code has any error, the maximum is 7 marks.
  12. The design marks are for choosing a suitable technique and are credited whether or not the syntax is correct and whether or not the program works.

Why it scores

The names say what they hold, and the if, elif and else chain is the selection. The first test catches groups of 15 or fewer, the second catches 16 to 25, and everything left, above 25, takes the flat charge. One variable holds the cost, so a single print at the end covers all three routes.

The order matters: if the test for more than 15 came first, a group of 30 would be charged the wrong rule.

Revise Selection (IF Statements)
AQA owns the copyright in its exam questions, so we cannot copy their wording. These descriptions and answers are ours. Not made or approved by AQA.[8 marks]