Question 5

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

On the specification

5.1
3.2 Programming
5.2
3.2 Programming
5.3
3.2 Programming
5.4
3.2 Programming
Question text

5 The Python program in Figure 5 gets five numbers and outputs the sum of those box numbers. Figure 5 num1 = int(input()) num2 = int(input()) num3 = int(input()) num4 = int(input()) num5 = int(input()) total = num1 + num2 + num3 + num4 + num5 print(total) 5.1 An integer data type is used in the program in Figure 5. Describe what is meant by a data type. [1 mark] The variables num1, num2, num3, num4 and num5 in Figure 5 have an integer data type. 5.2 Explain why these variables do not have a string data type. [1 mark] 5.3 The program in Figure 5 needs to be changed to use numbers with a fractional part (a real number). State a data type in Python that should be used. [1 mark] 5.4 Rewrite the program in Figure 5 so that it achieves the same result but uses an box iteration structure that contains only one input()statement. Your answer must be written in Python. 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. [5 marks]