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 | |
|---|---|---|
| 1Input: 15 | Expected: Pass | Actual: Pass | AThe result is wrong because the actual output (Fail) does not match the expected output (Pass), so the result should be Fail. | |
| 2Input: 15 | Expected: Pass | Actual: Fail | BInput: 72 | Expected: Pass | |
| 3Work out the expected output BEFORE running the algorithm, using the rules of the problem (e.g. a score of 50 or more is a pass). | CThe actual output matched the expected output, so this test case passes. | |
| 4A test table has columns for the input, the expected output, the actual output and whether the test passed or failed. | DThe actual output did not match the expected output, so this test case fails and the algorithm needs checking. | |
| 5Input: 40 | Expected: (copied from the program's output after running it) | EThe expected output was taken from the program's actual output instead of being worked out beforehand, so the test cannot find mistakes. | |
| 6Input: 50 | Expected: Pass | Actual: Fail | Result: Pass | F| Input | Expected | Actual | Result | |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
test case — A chosen input paired with the output you expect. Run the algorithm, record the actual output, then compare: if actual matches expected it passes, otherwise it fails.Input | Expected | Actual | Resultif actual = expected then
print "Pass"
else print "Fail"n ← 5
expected ← n * 2
print expectedInput 7 | Expected 14 | Actual 13 | Failn ← 4
actual ← double(n)
print actual