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("Hi") print("Bye") | AThe program was written in the editor but never run. Python only does the instructions after you press Run. | |
| 2print("Hello") | Bprint(1) print(2) print(3) | |
| 3Python runs a program one line at a time, starting at the first line and finishing at the last line | CPython does not run the last line first. It runs from the first line to the last, so Hi shows before Bye. | |
| 4You write the instructions in the editor, and the results appear in the output panel after you press Run | Dprint("Go!") | |
| 5print("Hi") print("Bye") # expected output: Bye then Hi | EPython runs the lines in order, so the output panel shows Hi first and then Bye | |
| 6print("Score: 10") # I typed this but did not press Run # output panel is empty | FA one-line program: when you press Run, the output panel shows Hello |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
program — A text file of Python instructions. You write it in the editor, and when you press Run, Python does each line in order from first to last and shows the output in the output panel.print("Hello, world!")print("Ready")
print("Set")
print("Go!")lives = 3
lives = lives - 1
print(lives)a = 2
b = a * 3
print(b)print(2 + 3)