Robust and secure programming

EasyMediumHard
123456789101112131415161718
Question 14
Easy

Complete the test plan for the program shown in Figure 1.

Figure 1

valid_entry = False
while valid_entry == False:
    score = int(input("Enter a level score (20 to 50): "))
    if score >= 20 and score <= 50:
        valid_entry = True
        print("Score accepted")
    else:
        print("Error: Score out of range")
Test typeTest dataExpected result
Normal data35"Score accepted" displayed
a.

| Invalid data | (a) | (b) |

[1]
b.

| Boundary data | (c) | (d) |

[1]

Robust and secure programming Questions

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