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 | |
|---|---|---|
| 1(a + b) / 2 | AThe brackets are missing, so only b is divided by 2. It should be average = (a + b) / 2. | |
| 2a + b / 2 | BDivides b by 2 first, then adds a, so it does not give the average of a and b | |
| 3Brackets are worked out first, so they can force an addition to happen before a multiplication | CAdds a and b first because of the brackets, then divides the total by 2 to find the average | |
| 4Python works out ** before * / // % and before + -, so the power is calculated first | DThree values are added but divided by 2. The total should be divided by 3 to find the average of three numbers. | |
| 5average = a + b / 2 | Eresult = 2 + 3 ** 2 | |
| 6average = (a + b + c) / 2 | Ftotal = (3 + 4) * 2 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
(a + b) / 2 — Python works out brackets first, so (a + b) / 2 adds a and b before dividing by 2. Without the brackets, the division would happen first and the average would be wrong.average = (a + b) / 2total = (5 + 3) * 2
print(total)avg = (m1 + m2 + m3) / 3print((2 + 3) * 4)print((2 + 3) ** 2)