Question 4
AQA Computer Science Specimen Paper 1B (8525/1B)GCSE5 marks
On the specification
- 3.2 Programming
Question text
4 A programmer has written a Python program that asks the user to input two integers and then output which of the two integers is the largest. Complete the program below by filling in the gaps using the items in Figure 3. You will not need to use all the items in Figure 3. Each item in Figure 3 should only be used once. [5 marks] Figure 3 print num1 num2 output else: < > elif str float int num1 = int(input("Enter a number: ")) num2 = (input("Enter a second number: ")) if num1 > num2: print(" is bigger.") elif num1 num2: print(" is bigger.") print("The numbers are equal.")