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

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 22 of 11

A coffee shop gives one stamp per drink on a card that holds 20 drinks. Every 4th stamp earns a biscuit, every 5th a pastry, and the 20th a cake with no biscuit or pastry. Figure 2 is a program that should print Free biscuit for a biscuit stamp, Free pastry for a pastry stamp, Free cake for the 20th, and Nothing free for any other drink; it has three gaps to fill. Each day the shop also adds up what it gave away: biscuit £1, pastry £2.50, cake £3.

Figure 2
A Python program with three gaps marked by numbered black circles.Open full size to read the labels (Figure 2, opens in a new tab)
02.1[3 marks]

Write the Python that fills gaps 1, 2 and 3 in Figure 2 so every stamp gets the correct reward.

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 answer for 02.1Hide model answer for 02.1
Gap 1:  i % 5 == 0
Gap 2:  print("Free biscuit")
Gap 3:  print("Nothing free")

The cake test comes first, so stamp 20 never reaches the pastry or biscuit tests.

3 marks

How the marks are earned

  1. Gap 1 is the condition i % 5 == 0.
  2. Gap 2 is print("Free biscuit").
  3. Gap 3 is print("Nothing free").
  4. Capital or small letters make no difference to the marking.
  5. Small spelling slips in the messages are ignored.
  6. Missing brackets on print cost one mark only, once, and are not penalised again for the other gap.

Why it scores

Gap 1 is the multiple-of-5 test, which sits between the cake test and the multiple-of-4 test. The next branch handles multiples of 4, so gap 2 prints the biscuit message. The else branch catches every other stamp, so gap 3 prints the nothing message.

Testing the most specific case first is what stops stamp 20 being given a pastry as well.

Revise Selection (IF Statements)
02.2[4 marks]

Write a program that reads how many free biscuits, pastries and cakes were given away into separate meaningful variables, then prints their total value.

See how you would score on Variables & Constants
Show model answer for 02.2Hide model answer for 02.2
free_biscuits = int(input("Free biscuits given: "))
free_pastries = int(input("Free pastries given: "))
free_cakes = int(input("Free cakes given: "))
day_value = free_biscuits * 1 + free_pastries * 2.5 + free_cakes * 3
print("Total value in pounds:", day_value)
4 marks

How the marks are earned

  1. At least one of the three counts is read from the keyboard into a variable.
  2. User input is stored in three separate variables, one each for biscuits, pastries and cakes.
  3. An expression that works out the total value correctly: 1 per biscuit, 2.5 per pastry and 3 per cake.
  4. The total value is output.
  5. The case of the code is ignored; messages with the input and output statements are optional.
  6. Gaps and spaces are ignored unless they change the logic.
  7. The same syntax error repeated in the three input statements costs only one mark.
  8. If the code has any error, the maximum is 3 marks.

Why it scores

Each count is read with input() and made a whole number with int(), in its own variable with a meaningful name. The total multiplies each count by its price (1, 2.5 and 3) and adds the results. The last line prints that total once.

Revise Variables & Constants
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.[7 marks]