Robust and secure programming

EasyMediumHard
123456789101112131415161718
Question 4
Easy

Complete the test plan below for the Python code shown in Figure 1.

Figure 1

valid_age = False
while valid_age == False:
    age = int(input("Enter player age (8 - 15): "))
    if age >= 8 and age <= 15:
        valid_age = True
    else:
        print("Invalid age entered")
print("Age accepted")
Test typeTest dataExpected result
Normal data10"Age accepted" message printed
Invalid data
Boundary data
[2]

Robust and secure programming Questions

  1. GCSE
  2. /Computer Science
  3. /Robust and secure programming