Robust and secure programming

EasyMediumHard
123456789101112131415161718
Question 18
Easy

A programmer is writing a system to validate the age of members joining a youth club. The age must be between 11 and 18 inclusive.

Below is the Python program used to perform this validation:

1  age = int(input("Enter your age: "))
2  while age < 11 or age > 18:
3      print("Invalid age")
4      age = int(input("Enter your age: "))
5  print("Age accepted")

Complete the test plan in the table below to test the validation of age.

Test numberTest typeTest dataExpected result
1Erroneous25(a)
2Boundary(b)"Age accepted"
3Normal15"Age accepted"
a.

State the missing values for (a) and (b).

[1]
b.

State the missing values for (a) and (b).

[1]

Robust and secure programming Questions

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