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 | |
|---|---|---|
| 1Iterative testing | AWrite the FOR loop, run it, find the error now | |
| 2Test, fix, retest | BThis leaves all testing to the end, so errors are found late and are harder to locate. Iterative testing tests each small part as it is written. | |
| 3Iterative testing finds errors early because each new part of the code is tested straight after it is written | CThe repeating cycle used on one part of the code until that part works correctly | |
| 4Repeat until the part works: after a fix, the same part is tested again before moving on | DThe fix is never retested, so the programmer cannot be sure the part now works or that the fix did not add a new error. The part must be tested again before moving on. | |
| 5Write the whole program, then test it only once at the end | ETesting each small part of the code as it is written, fixing any errors, then retesting before moving on | |
| 6Find an error, fix it, then move straight on to the next part | FREPEAT Test the part Fix any errors UNTIL Part works |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Iterative testing — Testing each small part of the code as it is written, fixing any errors, then retesting before moving on. This finds errors early and repeats until that part works.REPEAT
// test the part, then fix any errors
UNTIL PartWorks = TRUEWHILE PartWorks = FALSE DO
// fix the error and retest
ENDWHILEIF ActualOutput = ExpectedOutput THEN
PartWorks ← TRUE
ENDIFDECLARE Retests : INTEGER
Retests ← 0
Retests ← Retests + 1IF ErrorsFound > 0 THEN
// fix the error, then retest
ENDIF