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 | |
|---|---|---|
| 1Test input: age = 8 | AExpected: 10, Actual: 10 -> Pass | |
| 2Expected: say "Too young" | BWhat you predict the program should do before you run it | |
| 3Testing every path means trying an input for each branch of an if-else block | CTest 1: age = 15 (if path) Test 2: age = 8 (else path) | |
| 4Testing means comparing the actual result with the expected result | DOnly one path was tested. The else path was never checked, so a mistake there could be missed. Add a test input such as age = 8. | |
| 5Only test: age = 15 (if path only) | ENo expected result was written first, so you cannot tell if the program is right or wrong. Decide what should happen before you run it. | |
| 6Run the program and see what happens (no expected result) | FA chosen value you give the program to see how it behaves |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
testing — Running your program with chosen test inputs and comparing what happens to the result you expected. Test every path, so each branch of the program gets checked.Test input: 20
Expected result: say AdultTest input: 10
Expected result: say ChildTest 1: age 20 checks the IF path
Test 2: age 10 checks the ELSE pathask [Enter your age] and wait
if <answer > 17> then
say [Adult]Expected: say Adult
Actual: say Child
Result: FAIL