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 | |
|---|---|---|
| 1Total ← 0 | AStores the value 0 in the variable Total, so Total starts at zero | |
| 2Total ← Total + Score | BCount ← 10 | |
| 3The variable that receives the value goes on the left of the ← symbol | CThe calculation is on the left. The variable must be on the left and the calculation on the right, so it should be Total ← Total + Score. | |
| 4To keep a running total, assign the old total plus the new value back to the total | DTotal ← Total + Score | |
| 50 ← Total | EThe value and variable are the wrong way round. The variable must be on the left and the value on the right, so it should be Total ← 0. | |
| 6Total + Score ← Total | FWorks out the current Total plus Score, then stores the answer back in Total |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Total ← 0 — The ← symbol is assignment: it stores the value on its right in the variable on its left. Total ← 0 sets Total to 0. Total ← Total + Score adds Score to Total.Total ← 0Total ← 0
Score ← 8
Total ← Total + ScoreTotal ← 0
Score ← 8
Total ← Total + ScoreTotal ← 0
OUTPUT TotalScore ← 8
Total ← Total + Score