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 | |
|---|---|---|
| 1Execution order | AThe inner loop that resets each outer pass | |
| 2FOR j FROM 1 TO 2 | BThe exact sequence in which an algorithm's lines run | |
| 3Runs only when j equals 2 | CWrong - the inner loop restarts every outer pass | |
| 4Following code by hand to predict its output | DWrong - tracing must follow every line in order | |
| 5The inner loop never resets between outer passes | ETracing | |
| 6Tracing can skip lines to save time | FDISPLAY i |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Execution order — The exact sequence in which an algorithm's lines run, followed step by step to trace its behaviour.The outer loop runs from 1 to 3The inner loop runs from 1 to 2DISPLAY i runs when j = 2Trace tables help follow executionNested loops run the inner code repeatedly