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 | |
|---|---|---|
| 1Error on line 12: missing colon | AThe IDE underlines or highlights this faulty code, for example the missing closing bracket | |
| 2print("Total: " + score | BBreakpoint set on line 8 | |
| 3A breakpoint pauses the program at a chosen line so the programmer can check what is happening | CError diagnostics only find and report errors (where and what kind); they do not fix the code or write the program for the programmer | |
| 4Stepping through runs the program one line at a time so the programmer can find where the error happens | DStep through: line 5, then line 6, then line 7 | |
| 5Error diagnostics automatically rewrite the code so it is correct | EThis message has no line number and does not say what kind of error it is, so it does not diagnose the error well | |
| 6Error message: "Something is wrong" | FThe IDE reports the line number of the error and a message explaining the problem |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
error diagnostics — An IDE tool that finds errors in code and tells the programmer where they are and what kind they are, using line numbers, error messages, highlighting and debugging tools.print("Score: " score)
Error on line 1: invalid syntaxfor i in range(5)
SyntaxError: expected ':'Set a breakpoint on line 3 to pause the runDebugger: step through the code line by lineFaulty code is underlined in red by the IDE