Robust and secure programming

EasyMediumHard
123456789101112131415161718
Question 9
Easy

Complete the following test plan for the code shown in Figure 3.

Figure 3

valid_row = False
while not valid_row:
    row = int(input("Enter row number [12 to 25]: "))
    if row >= 12 and row <= 25:
        valid_row = True
    else:
        print("Error: Invalid row")
print("Row selected successfully")
Test typeTest dataExpected result
Normal data15"Row selected successfully" displayed
Invalid data[1][2]
Boundary data[3][4]
[2]

Robust and secure programming Questions

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