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 | |
|---|---|---|
| 1lives = 3 → lives = 5 | AChange a condition so the program needs a higher score before the message appears | |
| 2if score > 10: → if score > 20: | BNo prediction was made. Predict the output first, then run it and compare, so you learn whether you understood the code. | |
| 3Change one thing at a time, then run the program to see what that change did | Cprint("Hello, Sam!") → print("Hello, Mia!") | |
| 4Adding a feature means writing a new line that builds on the working program | DToo many changes at once. If the program breaks or acts strangely, you cannot tell which change caused it. Change one thing, run, then change the next. | |
| 5Changing the speed, the lives and the message all at once, then running the program | Eprint("Score:", score) print("Lives:", lives) | |
| 6Editing the code and running it without thinking what the output should be | FChange one value in a working program so the game gives the player more lives |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
modify code — Read a working program, then change one part, like a value, condition or message, to get new behaviour. Predict the result first, change one thing at a time, then run it.# Change score so it starts at 10
score = 10
print(score)age = 13
if age >= 13:
print("Teen")# Change the loop to show 1 to 5
for i in range(1, 6):
print(i)total = 0
for n in [4, 7]:
total += nif score > 50:
print("Pass")
else: