🛰️ Python, Grade 8 · session 1 of 16 · 60 minutes · free
Variables, maths and f-strings
Welcome aboard the station. NOVA, the station computer, remembers numbers in variables, does maths faster than anyone and writes tidy reports with f-strings. Today you take the controls.

A complete lesson · 60 minutes
Teach it, see it, practise it, all on this page.
Open this page with your learner and work down it, or press Teach this lesson to go through it one step at a time on a big screen. Every section has something to do.
- Warm-up3 min
- Warm-up games5 min
- Variables9 min
- Station maths9 min
- f-strings9 min
- Mission budget7 min
- Clock converter7 min
- Weight on other worlds5 min
- Quiz5 min
- Set the after-class project1 min
By the end you can
- Store and update values in variables
- Use + - * / // % ** and round() correctly
- Turn seconds into hours, minutes and seconds with // and %
- Write neat output with f-strings and formats like :.2f
Before you start
- Using a keyboard
- Times tables and basic fractions
Have ready
- A computer or tablet with this page open
- Paper for working out
Grade 8 · ages 13 and 14 · no experience needed
Warm-up · think first
NOVA puts 5 in a box, then doubles what is in the box three times. What is in the box now?
Show the answer
40: 5 becomes 10, then 20, then 40.
Teacher tip: Later today this becomes code: x = 5, then x = x * 2 three times.
🎮 Warm-up games · 5 quick games
Play with Bolt the robot
Five minutes with NOVA, the station computer. Vote, say why, then show the answer.
- Which one doesn't belong: 7 // 2, 7 % 2, 14 // 4, 9 % 6? (7 // 2 · 7 % 2 · 14 // 4 · 9 % 6)
Answer: 7 % 2 is the odd one: it makes 1, and the others all make 3. - Would you rather have 2 ** 10 coins or 10 ** 2 coins? (2 ** 10 coins · 10 ** 2 coins)
Answer: 2 ** 10 is 1024 coins, but 10 ** 2 is only 100. - x % 2 is 0 when x is an even number. (Always · Sometimes · Never)
Answer: Always — Always. An even number divides by 2 with nothing left over. - How many ways can you make 12 with two numbers and one of + - * // ** ?
Answer: Lots: 6 + 6, 15 - 3, 3 * 4, 24 // 2, 144 // 12 and more. Collect them on the board. - Eggs go in boxes of 12. How many boxes do you need for 100 eggs?
Answer: 9 boxes: 100 // 12 is 8 full boxes, and the 4 eggs left over need one more.
Three levels, like a real engineer
Use it. Tweak it. Build it.
First use what the lesson shows exactly as it is, then change one key thing and see what happens, then make your own.
- 🔒
Level 1 · Use it
Use it: Seconds Report
Run this exact code with total_seconds = 3672. Watch how // and % split seconds into hours, minutes, seconds, and how the f-string prints the neat report.
- 🔧
Level 2 · Tweak it
Tweak it: New Seconds
Change total_seconds from 3672 to 7325. Predict the new hours, minutes and seconds, then run it. Next change the f-string to show seconds with :.2f.
- 🛠️
Level 3 · Build it
Build it: Time Converter
Make your own converter that turns any number of seconds into hours, minutes and seconds. Use //, % and an f-string. Test it with 5000 seconds and one number you choose.
🗺️ Play the Lesson QuestThree worlds, one for each level, with short stages that bring back what you miss.
Part 1 of 3 · learn, see, practise
Variables: boxes that remember
Station log, day 1. I am NOVA. I remember things in labelled boxes called variables. Name a box, store a value with =, and use the name later.
A variable is a name for a value: fuel = 80 stores 80 in a box called fuel. The = sign means store, not equals.
You can store a new value made from the old one: fuel = fuel - 15. Names use letters, digits and _, never spaces, and cannot start with a digit.
🧑🏫 Teacher: type this live with the class
NOVA's fuel tank
fuel = 80Store 80 in a box called fuel. Nothing prints: ask why.
print(fuel)Ask NOVA what is in the box. No quotes, so we see the value.
fuel = fuel - 15Read it right to left: take the old fuel, subtract 15, store it back.
print("Fuel left:", fuel)Words in quotes, the variable without. The comma adds a space.
▶ Output
(nothing is printed)
📦 Memory boxes
▶ Output
Meals to pack: 72 Crew now: 8
📦 Memory boxes
8intmeals_each3intdays4inttotal_meals72intChange crew or days and run it again: every line that uses them updates.
Practise it
Start with the warm-up and go as far as you can. The stretch questions are meant to be hard.
1.1 Store 8 in a variable called planets, then print it.
▶ Output
(nothing is printed)
📦 Memory boxes
🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 2 lines the student writes
planets = 8print(planets)
What it prints
8
What ✓ Check looks for
- it prints exactly:
8
- In the code: Store 8 in a variable called planets.
1.2 Your score starts at 40. Add 10 to score itself, then print it.
▶ Output
(nothing is printed)
📦 Memory boxes
40int🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 2 lines the student writes
score = 40score = score + 10print(score)
What it prints
50
What ✓ Check looks for
- it prints exactly:
50
- In the code: Add to score itself: score = score + 10.
1.3 A rocket has 3 stages and each holds 1200 litres. Store both numbers in variables and print exactly: Total fuel: 3600
▶ Output
(nothing is printed)
📦 Memory boxes
🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 3 lines the student writes
stages = 3litres = 1200print("Total fuel:", stages * litres)
What it prints
Total fuel: 3600
What ✓ Check looks for
- it prints exactly:
Total fuel: 3600
- In the code: Multiply the two variables.
1.4 Swap the values so a is 9 and b is 5, then print a and b on one line.
▶ Output
(nothing is printed)
📦 Memory boxes
5intb9int🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 2 lines the student writes
a = 5b = 9a, b = b, aprint(a, b)
What it prints
9 5
What ✓ Check looks for
- it prints exactly:
9 5
- In the code: Swap with a, b = b, a (or use a temporary box called temp).
1.5 Fix the two bugs so it prints Area: 24
▶ Output
Line 3: SyntaxError: expected ')'
📦 Memory boxes
🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 2 lines the student writes
width = 6length = 4print("Area:", width * length)
What it prints
Area: 24
What ✓ Check looks for
- it prints exactly:
Area: 24
- In the code: Keep the sum as width * length.
1.6 The temperature starts at -12. It rises by 7, then falls by 3. Update temp each time and print the final value.
▶ Output
(nothing is printed)
📦 Memory boxes
-12int🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 3 lines the student writes
temp = -12temp = temp + 7temp = temp - 3print(temp)
What it prints
-8
What ✓ Check looks for
- it prints exactly:
-8
- In the code: Rise by 7: temp = temp + 7.
- In the code: Fall by 3: temp = temp - 3.
Part 2 of 3 · learn, see, practise
Station maths: // % ** and round
Station maths is fast maths. Besides + - * and /, I share out with //, find what is left with %, and raise to a power with **.
/ always gives a decimal: 7 / 2 is 3.5. // gives how many whole times: 7 // 2 is 3. % gives the remainder: 7 % 2 is 1.
** is a power: 2 ** 5 is 32. round(x, 2) keeps two decimal places. Python follows BIDMAS: brackets, then **, then * / // %, then + and -.
🧑🏫 Teacher: type this live with the class
Five kinds of maths
print(17 / 5)Ask first: what will it show? Then run: 3.4, a decimal.
print(17 // 5)Double slash: how many whole 5s fit in 17? Three.
print(17 % 5)Percent: what is left over? Two.
print(2 ** 10)Two to the power ten. Who guesses 1024?
print(round(22 / 7, 3))Round to 3 decimal places: 3.143.
▶ Output
(nothing is printed)
📦 Memory boxes
▶ Output
2 h 3 min 4 s
📦 Memory boxes
7384inthours2intleft184intminutes3intsecs4intTry 100000 seconds. This is how a clock turns seconds into hours and minutes.
Practise it
Start with the warm-up and go as far as you can. The stretch questions are meant to be hard.
2.1 Print 2 to the power 8 using **.
▶ Output
(nothing is printed)
📦 Memory boxes
🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 1 line the student writes
print(2 ** 8)
What it prints
256
What ✓ Check looks for
- it prints exactly:
256
- In the code: Use ** for a power.
2.2 Eggs go in boxes of 12. Print how many full boxes 100 eggs fill.
▶ Output
(nothing is printed)
📦 Memory boxes
🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 1 line the student writes
print(100 // 12)
What it prints
8
What ✓ Check looks for
- it prints exactly:
8
- In the code: Use // for whole boxes.
2.3 Print how many eggs are left over after filling the boxes of 12 from 100 eggs.
▶ Output
(nothing is printed)
📦 Memory boxes
🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 1 line the student writes
print(100 % 12)
What it prints
4
What ✓ Check looks for
- it prints exactly:
4
- In the code: Use % for what is left over.
2.4 Print the remainder when 2026 is divided by 2 (0 means even).
▶ Output
(nothing is printed)
📦 Memory boxes
🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 1 line the student writes
print(2026 % 2)
What it prints
0
What ✓ Check looks for
- it prints exactly:
0
- In the code: Use % 2.
2.5 Print the minutes as hours and minutes, like 2 h 15 min. It must still work if minutes changes.
▶ Output
(nothing is printed)
📦 Memory boxes
135int🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 1 line the student writes
minutes = 135print(minutes // 60, "h", minutes % 60, "min")
What it prints
2 h 15 min
What ✓ Check looks for
- it prints exactly:
2 h 15 min
- With
minutes = 200, it prints exactly:3 h 20 min
- In the code: Use // for the hours.
- In the code: Use % for the minutes left.
2.6 Three items cost price each. Print the total, rounded to 2 decimal places.
▶ Output
(nothing is printed)
📦 Memory boxes
349.99float🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 1 line the student writes
price = 349.99print(round(price * 3, 2))
What it prints
1049.97
What ✓ Check looks for
- it prints exactly:
1049.97
- In the code: Use round(…, 2).
Part 3 of 3 · learn, see, practise
f-strings: tidy reports
My reports must be tidy. An f-string is text with an f in front: anything inside { } is worked out and dropped into the text.
f"Fuel: {fuel} litres" puts the value of fuel inside the text, with no commas or extra spaces to fight with.
You can do maths inside { }, and add a format after a colon: {speed:.1f} shows one decimal place, {name:<6} pads the text to 6 characters.
🧑🏫 Teacher: type this live with the class
NOVA's crew card
name = "Asha"A word in quotes, stored in a variable.
age = 13A number in a variable.
print(f"{name} is {age}")The f goes before the quotes. Names in curly brackets become their values.
print(f"In 5 years: {age + 5}")You can do maths inside the brackets.
print(f"22 / 7 is about {22 / 7:.2f}")After the colon, .2f means two decimal places.
▶ Output
(nothing is printed)
📦 Memory boxes
▶ Output
4 x oxygen tank = 5002.00 rupees
📦 Memory boxes
'oxygen tank'strcount4intprice1250.5floatChange count and price. The sentence rebuilds itself.
Practise it
Start with the warm-up and go as far as you can. The stretch questions are meant to be hard.
3.1 Use an f-string to print: Next stop: Mars (using the variable).
▶ Output
(nothing is printed)
📦 Memory boxes
'Mars'str🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 1 line the student writes
planet = "Mars"print(f"Next stop: {planet}")
What it prints
Next stop: Mars
What ✓ Check looks for
- it prints exactly:
Next stop: Mars
- With
planet = "Venus", it prints exactly:Next stop: Venus
- In the code: Start the text with f.
3.2 Print 7 x 6 = 42 with one f-string that uses a and b.
▶ Output
(nothing is printed)
📦 Memory boxes
7intb6int🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 1 line the student writes
a = 7b = 6print(f"{a} x {b} = {a * b}")
What it prints
7 x 6 = 42
What ✓ Check looks for
- it prints exactly:
7 x 6 = 42
- With
a = 3, b = 4, it prints exactly:3 x 4 = 12
3.3 Print Speed: 7.67 km/s, showing speed with two decimal places.
▶ Output
(nothing is printed)
📦 Memory boxes
7.6666float🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 1 line the student writes
speed = 7.6666print(f"Speed: {speed:.2f} km/s")
What it prints
Speed: 7.67 km/s
What ✓ Check looks for
- it prints exactly:
Speed: 7.67 km/s
- In the code: Use {speed:.2f}.
3.4 Print the score and percentage like Score: 18/25 (72%). Work the percentage out in the f-string.
▶ Output
(nothing is printed)
📦 Memory boxes
18inttotal25int🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 1 line the student writes
score = 18total = 25print(f"Score: {score}/{total} ({score / total * 100:.0f}%)")
What it prints
Score: 18/25 (72%)
What ✓ Check looks for
- it prints exactly:
Score: 18/25 (72%)
- With
score = 20, it prints exactly:Score: 20/25 (80%)
3.5 Print the seconds as Time: 1 h 6 min 40 s, using //, % and one f-string.
▶ Output
(nothing is printed)
📦 Memory boxes
4000int🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 4 lines the student writes
seconds = 4000h = seconds // 3600m = seconds % 3600 // 60s = seconds % 60print(f"Time: {h} h {m} min {s} s")
What it prints
Time: 1 h 6 min 40 s
What ✓ Check looks for
- it prints exactly:
Time: 1 h 6 min 40 s
- With
seconds = 3725, it prints exactly:Time: 1 h 2 min 5 s
- In the code: Print with an f-string.
3.6 Print a receipt line: the item padded to 6 characters, then x and the quantity, then the cost right-aligned in 8 characters with 2 decimals: Tea x3 46.50
▶ Output
(nothing is printed)
📦 Memory boxes
'Tea'strqty3intprice15.5float🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 1 line the student writes
item = "Tea"qty = 3price = 15.5print(f"{item:<6}x{qty} {qty * price:>8.2f}")
What it prints
Tea x3 46.50
What ✓ Check looks for
- it prints exactly:
Tea x3 46.50
- In the code: Pad the item with {item:<6}.
- In the code: Right-align the cost with {…:>8.2f}.
Watch out
Common mistakes
Reading = as equals
x = x + 1 is not a puzzle: it means store x + 1 back in x.
Expecting / to give a whole number
7 / 2 is 3.5. Use // when you want whole groups.
Forgetting the f
"Fuel: {fuel}" prints the curly brackets. Put f before the quotes.
Spaces in names
my score = 5 stops with an error. Use my_score.
Class activity 1 of 3
Mission budget
Work out the cost of a 4-day mission with 6 crew. Follow the numbered steps and print this report:
MISSION BUDGET
Fuel: 3600 litres
Fuel cost: 216000 rupees
Meals: 72
Food cost: 36000 rupees
Total: 252000 rupees
- Print the title.
- Fuel is stages × litres each; fuel costs 60 rupees a litre.
- Meals are crew × 3 meals × days; a meal costs 500 rupees.
- Add the two costs for the total. Use f-strings and the variables throughout.
▶ Output
(nothing is printed)
📦 Memory boxes
3intlitres_each1200intcrew6intdays4intHint
Store each answer in a variable first (fuel, fuel_cost, meals, food_cost), then print them with f-strings.
🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 10 lines the student writes
# ===== Mission budget =====stages = 3litres_each = 1200crew = 6days = 4 print("MISSION BUDGET")fuel = stages * litres_eachfuel_cost = fuel * 60print(f"Fuel: {fuel} litres")print(f"Fuel cost: {fuel_cost} rupees")meals = crew * 3 * daysfood_cost = meals * 500print(f"Meals: {meals}")print(f"Food cost: {food_cost} rupees")print(f"Total: {fuel_cost + food_cost} rupees")
What it prints
MISSION BUDGET Fuel: 3600 litres Fuel cost: 216000 rupees Meals: 72 Food cost: 36000 rupees Total: 252000 rupees
What ✓ Check looks for
- it prints exactly:
MISSION BUDGET Fuel: 3600 litres Fuel cost: 216000 rupees Meals: 72 Food cost: 36000 rupees Total: 252000 rupees
- With
crew = 8, it prints exactly:MISSION BUDGET Fuel: 3600 litres Fuel cost: 216000 rupees Meals: 96 Food cost: 48000 rupees Total: 264000 rupees
- In the code: Use f-strings.
If they're stuck, say
Store each answer in a variable first (fuel, fuel_cost, meals, food_cost), then print them with f-strings.
Class activity 2 of 3
Clock converter
Turn a number of seconds into hours, minutes and seconds. For 9876 seconds print exactly:
9876 seconds is 2 h 44 min 36 s
- Hours are seconds // 3600.
- What is left is seconds % 3600; minutes are that // 60.
- Seconds left are seconds % 60.
- Print one f-string.
▶ Output
(nothing is printed)
📦 Memory boxes
9876intHint
seconds % 3600 is what is left after taking out the whole hours.
🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 4 lines the student writes
# ===== Clock converter =====seconds = 9876h = seconds // 3600m = seconds % 3600 // 60s = seconds % 60print(f"{seconds} seconds is {h} h {m} min {s} s")
What it prints
9876 seconds is 2 h 44 min 36 s
What ✓ Check looks for
- it prints exactly:
9876 seconds is 2 h 44 min 36 s
- With
seconds = 3661, it prints exactly:3661 seconds is 1 h 1 min 1 s
- In the code: Use //.
- In the code: Use %.
If they're stuck, say
seconds % 3600 is what is left after taking out the whole hours.
Class activity 3 of 3
Weight on other worlds
Gravity on the Moon is 0.165 of Earth's, on Mars 0.38 and on Jupiter 2.53. For a 40 kg astronaut print:
On the Moon: 6.6 kg
On Mars: 15.2 kg
On Jupiter: 101.2 kg
- Store each gravity number in a variable.
- Multiply earth by each one.
- Print each with one decimal place using :.1f.
▶ Output
(nothing is printed)
📦 Memory boxes
40intHint
f"{earth * moon:.1f}" multiplies and rounds in one go.
🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 6 lines the student writes
# ===== Weight on other worlds =====earth = 40moon = 0.165mars = 0.38jupiter = 2.53print(f"On the Moon: {earth * moon:.1f} kg")print(f"On Mars: {earth * mars:.1f} kg")print(f"On Jupiter: {earth * jupiter:.1f} kg")
What it prints
On the Moon: 6.6 kg On Mars: 15.2 kg On Jupiter: 101.2 kg
What ✓ Check looks for
- it prints exactly:
On the Moon: 6.6 kg On Mars: 15.2 kg On Jupiter: 101.2 kg
- With
earth = 60, it prints exactly:On the Moon: 9.9 kg On Mars: 22.8 kg On Jupiter: 151.8 kg
- In the code: Use :.1f for one decimal place.
If they're stuck, say
f"{earth * moon:.1f}" multiplies and rounds in one go.
After class · project
My station dashboard
Build a dashboard for your own space station: a title, the crew, the supplies and how long they last, all worked out with variables and printed with f-strings.
What to make: A Python program with no errors that prints a dashboard of at least 7 lines, every number worked out from variables.
Stretch: Add oxygen: 0.84 kg a person a day. Print how many kilograms are needed for 30 days, to 1 decimal place.
How it is marked
| Look for | Done well when |
|---|---|
| Runs | No red error when you press Run |
| Variables | Every number comes from a variable |
| Maths | Uses // or % at least once |
| Tidy | Uses f-strings and a border |
Starter code to take home
Press Copy and paste it into the editor at home, or work on it right here.
▶ Output
============================== STATION Orion ==============================
📦 Memory boxes
'Orion'strcrew5intfood_packs400intwater900int🔑 Show one possible solution (try it yourself first!)
▶ Output
============================== STATION Orion ============================== Crew: 5 Food lasts: 26 days Water after 10 days: 700 litres ==============================
📦 Memory boxes
'Orion'strcrew5intfood_packs400intwater900intfood_days26intwater_left700intHomework
Practise at home
Each one checks itself. Or print the practice sheet.
1. Store the seconds in a minute, minutes in an hour and hours in a day in variables, and print the seconds in a day.
▶ Output
(nothing is printed)
📦 Memory boxes
🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 4 lines the student writes
secs = 60mins = 60hours = 24print(secs * mins * hours)
What it prints
86400
What ✓ Check looks for
- it prints exactly:
86400
- In the code: Multiply the variables.
2. A t-shirt costs price. Print the price after 25% off, like Sale price: 60.00
▶ Output
(nothing is printed)
📦 Memory boxes
80int🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 1 line the student writes
price = 80print(f"Sale price: {price * 0.75:.2f}")
What it prints
Sale price: 60.00
What ✓ Check looks for
- it prints exactly:
Sale price: 60.00
- With
price = 200, it prints exactly:Sale price: 150.00
3. Print days as weeks and days, like 142 weeks 6 days.
▶ Output
(nothing is printed)
📦 Memory boxes
1000int🧑🏫 Model answer (for the teacher)
Teacher eyes only: hide the answers before you share your screen.
The answer green = the 1 line the student writes
days = 1000print(f"{days // 7} weeks {days % 7} days")
What it prints
142 weeks 6 days
What ✓ Check looks for
- it prints exactly:
142 weeks 6 days
- With
days = 50, it prints exactly:7 weeks 1 days
- In the code: Use //.
- In the code: Use %.
🔥 Challenge round · finished early?
The hardest questions of the lesson, no notes
Cover the notes and try these from memory. They are meant to make you think hard: draw, try small cases, and check your answer.
- Stretch task 1: Fix the two bugs so it prints Area: 24
- Stretch task 1: The temperature starts at -12. It rises by 7, then falls by 3. Update temp each time and print the final value.
- Stretch task 2: Print the minutes as hours and minutes, like 2 h 15 min. It must still work if minutes changes.
- Stretch task 2: Three items cost price each. Print the total, rounded to 2 decimal places.
- Stretch task 3: Print the seconds as Time: 1 h 6 min 40 s, using //, % and one f-string.
- Stretch task 3: Print a receipt line: the item padded to 6 characters, then x and the quantity, then the cost right-aligned in 8 characters with 2 decimals: Tea x3 46.50
🧠 Think-hard question
Print how many seconds old you are on your next birthday, worked out from your age with variables, in a sentence made with an f-string.
Talk it through or use the drawing board. There is more than one way to get there.
Quiz · 8 questions
Final quiz: check what you learned
Pick an answer to see if it is right and why. Your best score is saved on this device.
🖨 Print what we learned
Make a worksheet from this lesson
Pick what to practise, then print it or choose Save as PDF in the print window to download it.
For parents and teachers
The 60-minute lesson plan
Use it as it is, or stretch any part over two sessions. Each row links to the part of the page you need.
| Time | Part | The teacher | The learner |
|---|---|---|---|
| 0–3 min | Warm-up | Ask the question and wait for a guess before any hint. | Guess, then explain. |
| 3–8 min | Warm-up games | Play three or four games. Ask for a reason each time. | Vote and say why. |
| 8–17 min | Variables | Type-along first: type each line, say the words, run it. Show the example, then do the puzzle break together before the practice. | Type along, crack the puzzles, then practise. |
| 17–26 min | Station maths | Type-along first: type each line, say the words, run it. Show the example, then do the puzzle break together before the practice. | Type along, crack the puzzles, then practise. |
| 26–35 min | f-strings | Type-along first: type each line, say the words, run it. Show the example, then do the puzzle break together before the practice. | Type along, crack the puzzles, then practise. |
| 35–42 min | Mission budget | Show the boilerplate and read the numbered steps. Let them press Check often. | Follow the steps. |
| 42–49 min | Clock converter | Do step 1 together, then let them finish. | Finish the activity. |
| 49–54 min | Weight on other worlds | If time is short, set it as homework. | Try the challenge. |
| 54–59 min | Quiz | Read each question aloud. Vote, then check. | Answer and read why. |
| 59–60 min | Set the after-class project | Open the project and agree a due date. | Copy the boilerplate. |
Questions to ask
- What does = do in Python?
- When do you use // and when %?
- Why use an f-string instead of commas?
If it feels hard
Keep the first part slow: type every line of the type-along together and press Run after each one. Let the learner change a number and predict the result before running.
If it feels easy
Print how many seconds old you are on your next birthday, worked out from your age with variables, in a sentence made with an f-string.
FAQ
Variables, maths and f-strings: questions
Is this course right for a Grade 8 beginner?
Yes. It starts from zero but moves faster than our Grade 5 course, with more practice and real problems in every lesson.
Do we need to install Python?
No. Every program runs on the page, in the browser.
Start a conversation
Want a teacher to take this class?
Tell us the learner's age and level. A teacher from our network teaches with these lessons; we confirm timing and price first.
- Tell us the learner’s age or grade and goals
- We’ll suggest a suitable class or learning path
- We’ll confirm format, timing and fees with a parent or guardian