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 | |
|---|---|---|
| 1breakpoint | ASets a breakpoint on line 5 so the program will pause there | |
| 2Click beside line 5 in the editor | BClick the red dot beside line 5 again | |
| 3Running in debug mode makes the program stop at the breakpoint before the marked line runs | CA marker on a line that pauses the program there when it runs, so you can inspect variables | |
| 4Removing a breakpoint by clicking the red dot again so the program no longer pauses there | DRun > Start Debugging (F5) | |
| 5Set a breakpoint on a blank line or comment, then run the program normally (not in debug mode) | EThe program will not pause. Breakpoints only work when the program is run in debug mode and sit on a line of code that runs. | |
| 6Breakpoint set on line 10 but the bug happens on line 4 | FThe program pauses after the bug has already happened. Set the breakpoint on or just before the suspect line, such as line 4. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
breakpoint — A marker set on a line of code that pauses the program there when it runs, so you can inspect variables and step through. Set one by clicking beside the line; click again to remove it.total = 0
breakpoint()
print(total)# Click beside a line to set a breakpoint
print("Hi")age = 16
breakpoint()
print(age)# The program pauses at the breakpoint
x = 5# Click the red dot again to remove it
print("Done")