Skip to content

Course home

Robust and secure programming

Robust and secure programming

EasyMediumHard
12345678
Question 3

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

Figure 1

valid_setting = False
while valid_setting == False:
    humidity = int(input("Enter humidity percentage (45 to 75): "))
    if humidity >= 45 and humidity <= 75:
        valid_setting = True
        print("Humidity level accepted")
    else:
        print("Error: Humidity out of bounds")
Test typeTest dataExpected result
Normal data60"Humidity level accepted" displayed
a.

Invalid data: Test data

[1]
b.

Invalid data: Expected result

[1]
c.

Boundary data: Test data

[1]
d.

Boundary data: Expected result

[1]
Markscheme

Robust and secure programming Questions

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

27 exam-style questions on AQA GCSE Computer Science Robust and secure programming. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank