Complete the test plan in Table 1 to test the validation of pressure in the program in Figure 1.
Figure 1
pressure = int(input("Enter pressure between 12 and 35 bar: "))
while pressure < 12 or pressure > 35:
print("Pressure out of range")
pressure = int(input("Enter pressure between 12 and 35 bar: "))
print("Pressure verified")
Table 1
| Test number | Test type | Test data | Expected result |
|---|---|---|---|
| 1 | Erroneous | 5 | |
| 2 | Boundary | ||
| 3 | Normal | Pressure verified |
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.