Question 2

AQA Computer Science June 2025 Paper 1B (8525/1B)GCSE7 marks

On the specification

2.1
3.2 Programming
2.2
3.2 Programming
Question text

2 A coffee shop has a loyalty scheme which rewards customers for buying drinks. box The customer gets one stamp on their loyalty card for each individual drink they buy. • Every 4th stamp on the card gets the customer a free biscuit. • Every 5th stamp on the card gets the customer a free pastry. • When the customer reaches 20 stamps, they get a free cake (but no biscuit or pastry). The Python program shown in Figure 2 should display whether the customer gets a free biscuit, pastry, cake or nothing free for their first 20 drinks. For each drink purchased, the program must output either: "Free biscuit", "Free pastry", "Free cake" or "Nothing free". Some parts of the program have been replaced with the labels to . Figure 2 i = 1 while i <= 20: if i % 20 == 0: print("Free cake") elif : print("Free pastry") elif i % 4 == 0: else: i = i + 1 2.1 State the Python code that should be written in place of the labels in the program written in Figure 2. [3 marks] 2.2 The coffee shop wants to work out the total value of the free biscuits, pastries and box cakes given out each day. • Each free biscuit is worth £1 • Each free pastry is worth £2.50 • Each free cake is worth £3 Write a Python program to get the number of free biscuits, pastries and cakes, and calculate the total value for the day. Your program must: • get the user to enter the number of free biscuits and store it in a variable • get the user to enter the number of free pastries and store it in a variable • get the user to enter the number of free cakes and store it in a variable • calculate the total value of the free items • output the total value of the free items. 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. [4 marks]