🤖 Python Grade 5 · session 2 of 12 · 60 minutes · free
Python the super calculator
Bolt can do sums faster than anyone. Learn how to make Python add, multiply and share things out, then build a party planner.
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
- Add, take away, times and divide9 min
- Sharing with // and %9 min
- Words and answers together9 min
- Party planner7 min
- How old in days?7 min
- Odd or even detector5 min
- Quiz5 min
- Set the after-class project1 min
By the end you can
- Do sums with + - * and /
- Use // and % to share things out
- Use brackets to choose what happens first
- Print words and answers on one line
Before you start
- Lesson 1: print()
- Times tables up to 10
Have ready
- This page
- A pencil to guess answers first
Grade 5 · ages 10 and 11 · no experience needed
Warm-up · think first
12 sweets, 5 friends. How many does each friend get, and how many are left over?
Show the answer
Each gets 2, and 2 are left over. Today Python works that out with // and %.
Teacher tip: Let them share real objects or draw it first.
🎮 Warm-up games · 5 quick games
Play with Bolt the robot
Five minutes with Bolt the robot. Vote, say why, then show the answer.
- Which sum doesn't belong: 2 + 6, 4 × 2, 10 − 2, 3 × 3? (2 + 6 · 4 × 2 · 10 − 2 · 3 × 3)
Answer: 3 × 3 is the odd one: it makes 9, and the others make 8. - Would you rather have 3 bags of 7 coins, or 4 bags of 5 coins? (3 bags of 7 · 4 bags of 5)
Answer: 3 bags of 7 is 21 coins, which beats 4 bags of 5, which is 20. - If you share sweets equally, something is left over. (Always · Sometimes · Never)
Answer: Sometimes. 12 sweets among 4 friends leaves none, but 12 among 5 leaves 2. - 2 + 3 × 4: is it 20 or 14?
Answer: 14. Multiply first: 3 × 4 is 12, then add 2. Python follows the same rule. - Where do grown-ups use sums every day?
Answer: Shopping, cooking, travel, phone data. Collect ideas: the activities use some of them.
Part 1 of 3 · learn, see, practise
Add, take away, times and divide
I am very fast at sums! Use + and -, a star * for times and a slash / for divide. No quotes for numbers!
Without quotes, Python works out the sum and shows the answer. With quotes, it just shows the text.
Times is * and divide is /. Dividing with / always gives a decimal, like 4.0.
🧑🏫 Teacher: type this live with the class
Bolt does sums
print(7 + 5)No quotes this time! Ask for the answer first, then run.
print("7 + 5")Same thing with quotes. Ask: what will we see this time? Vote, then run. Text stays as text.
print(6 * 8)The star means times.
print(20 / 4)Slash means divide. Point out the answer has a .0, so it's a decimal.
▶ Output
(nothing is printed)
📦 Memory boxes
▶ Output
425 999 144 33.0
📦 Memory boxes
Change the numbers. Try a giant sum like 123456 * 789.
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 answer to 25 + 17.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print(25 + 17)1.2 Print the answer to 9 × 7.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print(9 * 7)1.3 A book costs 120 rupees. You pay with 500. Print your change, using a sum.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print(500 - 120)1.4 One week has 7 days. Print how many days are in 52 weeks, using a sum.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print(7 * 52)1.5 Print 100 ÷ 8 with /.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print(100 / 8)Part 2 of 3 · learn, see, practise
Sharing with // and %
Sharing sweets? Two slashes // tell you how many each friend gets. The % sign tells you how many are left over!
// is whole-number sharing: 17 // 5 is 3.
% gives the remainder, what is left: 17 % 5 is 2.
% is great for checking even numbers: an even number % 2 is 0.
🧑🏫 Teacher: type this live with the class
Share 17 sweets among 5 friends
print(17 // 5)Draw 17 dots on the board and circle groups of 5. How many groups? That's //.
print(17 % 5)How many dots aren't in a group? That's %.
print(10 % 2)No leftovers, so 10 is even.
print(11 % 2)One left over, so 11 is odd. Ask: test your age!
▶ Output
(nothing is printed)
📦 Memory boxes
▶ Output
6 1 0 1
📦 Memory boxes
Which line tells you if a number is even? Try your house number.
Practise it
Start with the warm-up and go as far as you can. The stretch questions are meant to be hard.
2.1 20 sweets, 3 friends. Print how many each friend gets.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print(20 // 3)2.2 20 sweets, 3 friends. Print how many are left over.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print(20 % 3)2.3 Print the remainder when 45 is divided by 7.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print(45 % 7)2.4 A van holds 8 children. Print how many full vans 50 children fill.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print(50 // 8)2.5 100 minutes is how many whole hours, and how many minutes left? Print the two answers on two lines.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print(100 // 60)
print(100 % 60)Part 3 of 3 · learn, see, practise
Words and answers together
Numbers alone are boring. Use a comma and I'll show words and answers together, with a space between them. Brackets tell me what to do first!
A comma inside print shows several things with spaces between: print("Total:", 5 + 3).
Python does * and / before + and -. Brackets go first: (2 + 3) * 4 is 20.
🧑🏫 Teacher: type this live with the class
A friendly answer
print("Pizzas:", 3)The comma adds a space for us.
print("Slices:", 3 * 8)Words in quotes, sum without quotes.
print(2 + 3 * 4)Ask for the answer first. Is it 20 or 14?
print((2 + 3) * 4)Brackets go first. Now it's 20.
▶ Output
(nothing is printed)
📦 Memory boxes
▶ Output
Cookies: 24 Each person gets 4 Left over: 4
📦 Memory boxes
Change the 24 and the 5 to plan your own party.
Practise it
Start with the warm-up and go as far as you can. The stretch questions are meant to be hard.
3.1 Print exactly: Total: 15, working out 7 + 8 in the code.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print("Total:", 7 + 8)3.2 Print exactly: Legs: 16, working out how many legs 4 dogs have.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print("Legs:", 4 * 4)3.3 Use brackets so this prints 30 instead of 16.
▶ Output
16
📦 Memory boxes
Model answer (for the teacher)
print((2 + 3) * 6 - 4)3.4 Each ticket costs 45 rupees. Print exactly: 3 tickets cost 135 rupees, with the sum in the code.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print("3 tickets cost", 3 * 45, "rupees")3.5 Print exactly: 1 hour 40 minutes, working both numbers out from 100 minutes.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print(100 // 60, "hour", 100 % 60, "minutes")Watch out
Common mistakes
Putting a sum in quotes
print("5 + 3") shows the words 5 + 3. Remove the quotes to get 8.
Using x for times
Python uses a star: 4 * 5, never 4 x 5.
Mixing up // and %
// is how many in each group. % is what is left over.
Forgetting the comma
print("Total" 5) stops with an error. Write print("Total", 5).
Class activity 1 of 3
Party planner
24 cookies, 5 friends. Follow the steps to print a party plan like this:
PARTY PLAN
Each friend gets 4
Left over: 4
Cost: 120 rupees
- Print the title.
- Use // to work out each friend's share.
- Use % for the leftovers.
- Each cookie costs 5 rupees: use * for the cost.
▶ Output
(nothing is printed)
📦 Memory boxes
Hint
Use commas between words and sums, as in print("Left over:", 24 % 5).
Model answer (for the teacher)
# ===== Party planner =====
print("PARTY PLAN")
print("Each friend gets", 24 // 5)
print("Left over:", 24 % 5)
print("Cost:", 24 * 5, "rupees")Class activity 2 of 3
How old in days?
Work out how long someone aged 11 has been alive. Follow the steps, and let Python do all the sums.
- Print the days: 11 × 365.
- Print the hours: 11 × 365 × 24.
- Print the minutes.
- Make each line a sentence with a comma.
▶ Output
(nothing is printed)
📦 Memory boxes
Hint
Each line builds on the one before. Add one more * each time.
Model answer (for the teacher)
# ===== How old in days? =====
print("Days:", 11 * 365)
print("Hours:", 11 * 365 * 24)
print("Minutes:", 11 * 365 * 24 * 60)Class activity 3 of 3
Odd or even detector
Use % 2 to check three numbers. An answer of 0 means even, and 1 means odd.
- Print 14 % 2.
- Print 27 % 2.
- Print 100 % 2.
- Say which are even.
▶ Output
(nothing is printed)
📦 Memory boxes
Hint
Copy the pattern: print("14 gives", 14 % 2).
Model answer (for the teacher)
# ===== Odd or even detector =====
print("14 gives", 14 % 2)
print("27 gives", 27 % 2)
print("100 gives", 100 % 2)After class · project
My holiday money planner
Plan a day out for your family and let Python work out the money. Change the numbers to make it your own trip, and keep every answer as a sum in the code.
What to make: A program with no errors that prints a bill with at least 6 lines, with Python doing every sum.
Stretch: Add a line that says how much is left from 2,000 rupees after the trip.
How it is marked
| Look for | Done well when |
|---|---|
| Runs | No red error |
| Sums | Python works out each answer |
| Sharing | Uses // and % |
| Neat | A title and borders |
Starter code to take home
Press Copy and paste it into the editor at home, or work on it right here.
▶ Output
========================== DAY OUT AT THE ZOO ========================== Tickets: 600
📦 Memory boxes
🔑 Show one possible solution (try it yourself first!)
▶ Output
========================== DAY OUT AT THE ZOO ========================== Tickets: 600 Food: 480 Travel: 300 Total: 1380 Each person pays 345 Left to share: 0
📦 Memory boxes
Homework
Practise at home
Each one checks itself. Or print the practice sheet.
1. Print the answer to 345 + 678.
▶ Output
(nothing is printed)
📦 Memory boxes
2. Print exactly: Weeks in a year: 52, with 364 // 7 in the code.
▶ Output
(nothing is printed)
📦 Memory boxes
3. A bus has 40 seats. Print how many seats 6 buses have.
▶ Output
(nothing is printed)
📦 Memory boxes
4. Print the remainder when 100 is divided by 7.
▶ Output
(nothing is printed)
📦 Memory boxes
5. Add brackets to this line so it prints 50.
▶ Output
30
📦 Memory boxes
🔥 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: Print 100 ÷ 8 with /.
- Stretch task 2: 100 minutes is how many whole hours, and how many minutes left? Print the two answers on two lines.
- Stretch task 3: Print exactly: 1 hour 40 minutes, working both numbers out from 100 minutes.
🧠 Think-hard question
Work out how many weeks and days are in 100 days, and print exactly: 14 weeks and 2 days.
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 | Add, take away, times and divide | Do the type-along first: type each line, say the words, run it. Then show the example. | Type along, then do the practice. |
| 17–26 min | Sharing with // and % | Do the type-along first: type each line, say the words, run it. Then show the example. | Type along, then do the practice. |
| 26–35 min | Words and answers together | Do the type-along first: type each line, say the words, run it. Then show the example. | Type along, then do the practice. |
| 35–42 min | Party planner | Show the boilerplate and read the numbered steps. Let them press Check often. | Follow the steps. |
| 42–49 min | How old in days? | Do step 1 together, then let them finish. | Finish the activity. |
| 49–54 min | Odd or even detector | 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 is the difference between // and %?
- Why does print("5 + 3") not show 8?
- What happens first in 2 + 3 * 4?
If it feels hard
Use real objects for // and %: buttons or coins in groups. Let the learner predict every answer before pressing Run.
If it feels easy
Work out how many weeks and days are in 100 days, and print exactly: 14 weeks and 2 days.
FAQ
Python the super calculator: questions
Why does Python use * and not x for times?
The letter x could be a name in a program, so Python uses a star instead. Calculators and spreadsheets do the same.
What does % mean in Python?
In Python, % gives the remainder after dividing. It is not about percentages here.
Why does 20 / 4 show 5.0?
The / sign always gives a decimal answer. Use // when you want a whole number.
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