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 | |
|---|---|---|
| 1State the purpose of the algorithm | ANot precise: it does not say what is wrong with the condition, for example that < should be <= so that 100 is included. | |
| 2Describe the processes in the algorithm | BToo vague: it lists features of the code but does not say what the algorithm does with the data, so it earns no marks for describing processes. | |
| 3Identify an error: name the exact line and say what is wrong with it | CWrite one sentence saying what the algorithm achieves overall, e.g. it finds the largest of 10 numbers entered | |
| 4Suggest a correction: write the replacement code using the right symbols in the condition | DLine 4: = is used for assignment, it should be ← | |
| 5The algorithm uses a loop and an IF and some variables. | ESay what the algorithm does with its data step by step, e.g. it adds each mark to Total and counts the marks | |
| 6Line 6 is wrong because the condition does not work. | FChange WHILE Mark > 100 to WHILE Mark >= 100 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
command word — The exam word that tells you what to write: state the purpose, describe the processes, identify the error, suggest the correction, each in precise terms.Error: Count = Count + 1 uses = to assign
Correction: Count ← Count + 1Error: Mark > 50 does not include 50
Correction: Mark ≥ 50Error: OR used in a range check
Correction: Age ≥ 11 AND Age ≤ 16Error: Total is not set to zero first
Correction: Total ← 0 before the loop// Purpose: find the largest Mark
IF Mark > Largest THEN
Largest ← Mark