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

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

In Figure 5, Python collects five whole numbers from the keyboard, converting each with int(), and displays the sum.

Figure 5
A short Python program of seven lines.Open full size to read the labels (Figure 5, opens in a new tab)
05.1[1 mark]

Define the term data type.

See how you would score on Data Types

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

Show model answer for 05.1Hide model answer for 05.1

A data type says what kind of data a variable holds, such as a whole number, a real number or text. It also decides which operations can be used on that value.

1 mark

How the marks are earned

  1. A data type specifies the kind of value or data a variable holds.
  2. Alternatively, it fixes the operations that may be performed on whatever a variable holds.
  3. Writing information in place of data does not earn the mark.
Revise Data Types
05.2[1 mark]

Explain why num1 to num5 are not given a string data type.

See how you would score on Data Types
Show model answer for 05.2Hide model answer for 05.2

Strings would be joined, not added. For example "4" + "7" would give "47" instead of 11, so total would be wrong.

1 mark

How the marks are earned

  1. With string variables, + would stick the numbers together as text (concatenation) rather than adding them.
  2. Or the numbers have to be added to each other.
  3. Or + works as arithmetic only when the values on both sides of it are numbers.
Revise Data Types
05.3[1 mark]

Name the Python data type that holds numbers with a fractional part.

See how you would score on Data Types
Show model answer for 05.3Hide model answer for 05.3

float. A float holds a number with a fractional part, such as 3.5.

1 mark

How the marks are earned

  1. float.
  2. Case is ignored.
  3. The word real is rejected.
Revise Data Types
05.4[5 marks]

Rewrite Figure 5 so a loop with only one input() call totals the five numbers. Use meaningful variable names.

See how you would score on Iteration (Loops)
Show model answer for 05.4Hide model answer for 05.4
sum_so_far = 0
for turn in range(1, 6):
   amount = int(input())
   sum_so_far = sum_so_far + amount
print(sum_so_far)
5 marks

How the marks are earned

  1. An iteration structure that exists in the language is used (design mark).
  2. The loop condition makes it repeat exactly five times.
  3. User input is used once, in a sensible place inside the loop.
  4. The total of the entered values is built up correctly.
  5. The total is output once, in a sensible place after the loop.
  6. The case of the code is ignored; messages with input and output are optional; gaps are ignored unless they change the logic.
  7. If the code has any error, the maximum is 4 marks.
  8. The design mark is for choosing a suitable technique and is credited whether or not the syntax is correct and whether or not the program works.

Why it scores

The for loop is the iteration, and range(1, 6) makes it run exactly five times. The one input() call sits inside the loop, so a new number is read on every pass. Each number is added to sum_so_far, which starts at 0. The print is outside the loop, so the total shows only once, at the end.

Revise Iteration (Loops)
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]