๐ฐ๏ธ Python, Grade 8 ยท session 4 of 16 ยท 60 minutes ยท ๐ free with an account
Mixed practice 1: mission week
Mission week: no new commands today, just practice. Each part mixes two of the first three lessons, starting easy and ending with problems a real programmer would enjoy.

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
- Numbers and f-strings9 min
- Decisions9 min
- Loops with decisions9 min
- Shop till7 min
- Number detective7 min
- Times-table quiz5 min
- Quiz5 min
- Set the after-class project1 min
By the end you can
- Choose the right tool: maths, f-strings, if or a loop
- Combine decisions and loops in one program
- Read a problem, plan it, then code it
- Debug by running small tests
Before you start
- Lessons 1 to 3 of this course
Have ready
- A computer or tablet with this page open
- Paper for planning
Grade 8 ยท ages 13 and 14 ยท no experience needed
Warm-up ยท think first
What is the smallest number that leaves a remainder of 1 when divided by 2, 3, 4, 5 and 6?
Show the answer
61: 60 is the smallest number all of them divide into, and 60 + 1 = 61.
Teacher tip: Later: how could a while loop find it without any cleverness?
๐ฎ 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 line doesn't belong: print(10 // 3), print(7 % 4), print(3 ** 1), print(9 / 3)? (print(10 // 3) ยท print(7 % 4) ยท print(3 ** 1) ยท print(9 / 3))
Answer: print(9 / 3) is the odd one: it shows 3.0, a decimal, and the others show the whole number 3. - Would you rather write a loop that runs 100 times, or copy the same line 100 times? (A loop that runs 100 times ยท Copy the line 100 times)
Answer: The loop: two lines instead of a hundred, and easy to change. - A for loop can be rewritten as a while loop. (Always ยท Sometimes ยท Never)
Answer: Always โ Always. Any for loop can be written with a counter and while. - How many different programs can you think of that print the numbers 1 to 5?
Answer: Many: five prints, a for loop, a while loop, a loop with a step, even a countdown reversed. Collect them. - How many times does the digit 7 appear when you write all the numbers from 1 to 100?
Answer: 20 times: ten 7s in the ones place (7, 17, โฆ 97) and ten in the tens place (70 to 79), with 77 having one of each.
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
Run the crew check
Run the Crew Check example exactly as written: a for loop over range(1, 4) with an indented if and else inside it. Notice which crew rests and what each line prints.
- ๐ง
Level 2 ยท Tweak it
Change Crew Numbers
In 'Crew Check', change range(1,4) to range(1,6) and crew == 2 to crew == 3. Predict what changes, then run it and check.
- ๐ ๏ธ
Level 3 ยท Build it
Build Mission Checker
Make your own mission program with a loop, an if, and an f-string. Check 5 oxygen tanks and print each tank's status. Test it with small runs.
Part 1 of 3 ยท learn, see, practise
Remix: numbers and f-strings
Mission week, day 1: the reports. Every answer must be worked out by me, and every report must look tidy.
Plan first: what are the inputs, what is the sum, what should the output look like?
Store answers in variables with clear names, then print them with an f-string. Use :.2f for money and round() only when the task asks for it.
๐งโ๐ซ Teacher: type this live with the class
Circle report
import mathmath gives us pi and square roots.
r = 7A radius.
area = math.pi * r ** 2Power before times: r squared, then times pi.
print(f"Area: {area:.2f}")Two decimal places: 153.94.
โถ Output
(nothing is printed)
๐ฆ Memory boxes
โถ Output
A 10 m square has a 14.1 m diagonal
๐ฆ Memory boxes
<module 'math'>moduleside10intdiagonal14.142135623730951floatPythagoras in one line. Change side and run again.
Practise it
Start with the warm-up and go as far as you can. The stretch questions are meant to be hard.
1.1 Print the area of a circle with radius r, to 2 decimal places, like Area: 153.94
โถ Output
(nothing is printed)
๐ฆ Memory boxes
<module 'math'>moduler7int๐งโ๐ซ 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
import mathr = 7print(f"Area: {math.pi * r ** 2:.2f}")
What it prints
Area: 153.94
What โ Check looks for
- it prints exactly:
Area: 153.94
- With
r = 1, it prints exactly:Area: 3.14
- In the code: Use math.pi.
1.2 A marathon is km kilometres. Print it in metres as a whole number, like 42195 m
โถ Output
(nothing is printed)
๐ฆ Memory boxes
42.195float๐งโ๐ซ 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
km = 42.195print(f"{round(km * 1000)} m")
What it prints
42195 m
What โ Check looks for
- it prints exactly:
42195 m
- In the code: Multiply by 1000.
1.3 4 friends share a bill and add a 10% tip. Print Each pays: 506.00
โถ Output
(nothing is printed)
๐ฆ Memory boxes
1840intfriends4int๐งโ๐ซ 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
bill = 1840friends = 4print(f"Each pays: {bill * 1.1 / friends:.2f}")
What it prints
Each pays: 506.00
What โ Check looks for
- it prints exactly:
Each pays: 506.00
- With
bill = 1000, it prints exactly:Each pays: 275.00
1.4 Ask for a number of days and print weeks and days, like 2 weeks 3 days for 17.
โถ 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
d = int(input("Days? "))print(f"{d // 7} weeks {d % 7} days")
What it prints when they type 17
Days? 17 2 weeks 3 days
What โ Check looks for
- When they type
17, the last line it prints is2 weeks 3 days - When they type
70, the last line it prints is10 weeks 0 days
1.5 BMI is weight divided by height squared. Print BMI: 20.3 to one decimal place.
โถ Output
(nothing is printed)
๐ฆ Memory boxes
52intheight1.6float๐งโ๐ซ 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
weight = 52height = 1.6print(f"BMI: {weight / height ** 2:.1f}")
What it prints
BMI: 20.3
What โ Check looks for
- it prints exactly:
BMI: 20.3
- With
weight = 64, it prints exactly:BMI: 25.0
- In the code: Square the height with ** 2.
1.6 5000 rupees grow by 8% a year for 3 years: P ร 1.08 ** 3. Print Amount: 6298.56
โถ Output
(nothing is printed)
๐ฆ Memory boxes
5000intyears3int๐งโ๐ซ 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
p = 5000years = 3print(f"Amount: {p * 1.08 ** years:.2f}")
What it prints
Amount: 6298.56
What โ Check looks for
- it prints exactly:
Amount: 6298.56
- With
years = 1, it prints exactly:Amount: 5400.00
- In the code: Use ** for the years.
๐ Free for a year
Make a free account to open the rest of this lesson
Every new account opens every lesson of every course free for a whole year: no payment, no card, nothing to cancel.
Unlocking the rest of this lesson gives you:
- Part 2: Remix: decisions, with practice at three levels
- Part 3: Remix: loops with decisions, with practice at three levels
- Class activity 1: Shop till
- Class activity 2: Number detective
- Class activity 3: Times-table quiz
- A 8-question quiz
- After-class project: Mission control quiz game
- Homework and a printable practice sheet with answers
- Teach mode and the minute-by-minute teacher's plan
It takes a minute. Anyone under 13 signs up with a parent. The first 2 lessons of every course, every game and all maths practice stay free.
FAQ
Mixed practice 1: mission week: questions
Why a whole lesson of mixed practice?
Mixing topics makes learners choose the right tool, which is the real skill in programming. It also shows what has stuck before new topics arrive.
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