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 | |
|---|---|---|
| 1print "Total: " + total | AThe heading is printed inside the loop, so it repeats before every record instead of appearing once | |
| 2print "=== Class Report ===" | Bfor i from 1 to 5 total <- total + marks[i] next i print "Total: " + total | |
| 3Print one record per line by putting the print statement inside a loop | CThe + joining the label and the variable is missing, so the label and value are not combined into one output | |
| 4Print the total once after the loop, so it appears at the end of the report | Dfor i from 1 to 5 print names[i] + ": " + marks[i] next i | |
| 5print "Total: " total | EPrints a heading line at the top of a report | |
| 6for i from 1 to 5 print "Report" print names[i] + ": " + marks[i] next i | FShows a label followed by the value of total, so the result is easy to read |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
print "Total: " + total — A print statement that joins a label to a value so results are readable. Use headings, labels and one record per line, often inside a loop, to build a report.print "Total: " + totalprint "Total: " + totalfor i from 1 to 5
print "Mark: " + marks[i]
end foraverage <- total / count
print "Student Report"
print "Average: " + averagefor i from 1 to count
print names[i] + ": " + marks[i]
end for