Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1age = "" | Atest_value = 100 | |
| 2age = "abc" | BTest data for a type check: text instead of a number that should be rejected | |
| 3Boundary test just inside the upper limit of a range of 1 to 100: expected result accepted | CTest data for an existence check: an empty value that should be rejected | |
| 4Boundary test just outside the upper limit of a range of 1 to 100: expected result rejected | DAll values are well inside the range. There are no boundary values (1, 100) and no invalid values (0, 101) to test the limits. | |
| 5Range 1-100 tests: 50, 60, 70 | E25 is a number, so a type check for numbers would accept it. The test needs text such as "abc" to be rejected. | |
| 6Type check test: 25 (expected: rejected) | Ftest_value = 101 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
test data — Values chosen to test each validation rule: empty for existence, text for type, and values just inside and just outside range limits, each with an expected result.# Range rule: 13 to 18 inclusive
testBelow = 12 # just outside the limit# Type rule: age must be a whole number
testText = "twelve"
# Expected result: rejected# Existence rule: name must not be empty
testName = ""
hasValue = len(testName) > 0# Range rule: 13 to 18 inclusive
testUpper = 18 # just inside the limit# Range rule: 13 to 18. Test value: 13
expected = "accepted"