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 = price * qty | AA short, readable high-level line, so a mistake in it is easy to spot and fix | |
| 2LDA 20 ADD 21 STA 22 | BLine 4: NameError: name 'totl' is not defined | |
| 3Debugging means finding and fixing errors in a program | CTiny instructions make the program much longer and harder to read, so errors are harder to find, not easier. | |
| 4A translator gives a clearer error message for high-level code, so it is quicker to fix | DLow-level code where each step does very little, so a long program hides errors and is harder to debug | |
| 5A student says: 'Low-level code is easier to debug because every instruction is tiny.' | EReadable, shorter code makes errors easier to spot, and translators give clearer messages for it. | |
| 6A student says: 'High-level code is harder to debug because it is written in words.' | Fprint(totl) # fix: print(total) |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
easier to debug — Debugging is finding and fixing errors. It is easier in short, readable high-level code than in long, hard-to-read low-level code, and translators give clearer error messages for it.# Easy to read, so easy to debug
total = price * qtyLDA price
MUL qty
STA total# Short line: error is easy to spot
print(total)# Readable loop: easy to debug
while count > 0:
count = count - 1# Translator reports the line number
name = input("Name? ")