๐ L01 โ Python Refresher Self-Check Handout
Class: Year 9 Game On ยท 9GAMZA ยท Term 2 2026
Duration: 75 minutes (target ~50 minutes, extra time for thorough work)
Marks: /75 total ยท Part A 20 ยท Part B 15 ยท Part C 20 ยท Part D 20
Rules: You must answer EVERY question before the Submit button unlocks. Once submitted, you'll see your score and the correct answers. Your progress saves on this laptop as you type โ close the tab and it'll still be there when you come back.
Part A โ Predict the Output
A1 (2 marks)
What prints?
x = 5
y = 3
print(x + y)
A2 (2 marks)
What prints?
a = "5"
b = "3"
print(a + b)
A3 (2 marks)
What prints?
fruits = ["apple", "banana", "cherry"]
print(fruits[1])
A4 (2 marks)
What prints?
for i in range(3):
print(i)
A5 (2 marks)
What prints?
age = 16
if age >= 18:
print("adult")
else:
print("minor")
A6 (2 marks)
What prints?
name = "Ada"
greet = f"Hello, {name}!"
print(greet)
A7 (2 marks)
What prints?
nums = [10, 20, 30]
print(len(nums))
A8 (2 marks)
What prints?
count = 0
while count < 3:
count += 1
print(count)
A9 (2 marks)
What prints?
def double(x):
return x * 2
print(double(7))
A10 (2 marks)
What prints?
score = 42
print(type(score).__name__)
Part B โ Fill in the Blank
B1 (3 marks)
Fill in the blank so the program prompts the user for their name and then prints the greeting. Use
input(...) with a prompt string so the user knows what to type._________________
print(f"Hello, {name}!")
B2 (3 marks)
Fill in the blank to add
"grape" to the end of the list.fruits = ["apple", "banana"]
_________________
print(fruits) # ['apple', 'banana', 'grape']
B3 (3 marks)
Fill in the blank to print the numbers 0 through 4. (The loop variable must be
i because the body below uses print(i).)_________________
print(i)
B4 (3 marks)
Fill in the blank โ pass if score is 50 or more, otherwise fail.
_________________
print("pass")
else:
print("fail")
B5 (3 marks)
Fill in the blank so the function returns the hp AFTER taking damage.
def take_damage(hp, damage):
_________________
print(take_damage(100, 25)) # should print 75
Part C โ Debug
C1 (5 marks)
This code should print
Hello, world! โ fix it. Write the fixed ONE line of code.print(Hello, world!)
C2 (5 marks)
Fix this so it stores the string "Grace" in the variable
name.name = Grace
print(name)
C3 (5 marks)
This checks if age is 18 or over โ but it's broken. Fix the first line.
if age = 18:
print("adult")
C4 (5 marks)
This should print the FIRST fruit in the list. Fix the
print line.fruits = ["apple", "banana", "cherry"]
print(fruits[1]) # wrong โ this prints banana
Part D โ Coding Tasks (Write Python)
D1 (10 marks)
Task: Write a program that asks the user for two numbers and prints the LARGER one (or "They're equal" if both the same).
Expected output examples:
If user types 5 and 9 โ prints
If user types 10 and 10 โ prints
If user types 100 and 42 โ prints
If user types 5 and 9 โ prints
9If user types 10 and 10 โ prints
They're equalIf user types 100 and 42 โ prints
100
D2 (10 marks)
Task: Write a program with a list of 5 game characters. Use a
for loop to print each one on its own line, numbered from 1.
Expected output:
1. Mario
2. Link
3. Samus
4. Kirby
5. Pikachu
Hint: use enumerate(list, start=1) or track index with a counter.
Once submitted, all answers lock and you'll see your score + correct answers.
๐ Your Results
0 / 75
0%
How to submit to Google Classroom:
1. Click Copy results for Classroom below โ a summary copies to your clipboard.
2. Open today's assignment in Google Classroom.
3. Paste (Ctrl+V) into the comment / submission box.
4. Click Mark as done.
1. Click Copy results for Classroom below โ a summary copies to your clipboard.
2. Open today's assignment in Google Classroom.
3. Paste (Ctrl+V) into the comment / submission box.
4. Click Mark as done.