🤖 Python Grade 5 · session 1 of 12 · 60 minutes · free
Hello, Python! Make the computer talk
Meet Bolt the robot! Bolt does exactly what you type, nothing more. Today you make Bolt talk, fix silly mistakes and draw pictures made of text.
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
- print() makes the computer talk9 min
- Bug hunt: fix Bolt's mistakes9 min
- Pictures with text and *9 min
- Robot name badge7 min
- Emoji story7 min
- Bug squad5 min
- Quiz5 min
- Set the after-class project1 min
By the end you can
- Use print() to make the computer show words
- Find and fix three common bugs
- Repeat a symbol with * to draw pictures
- Write a comment that explains your code
Before you start
- Using a keyboard: letters, brackets and quotes
- No coding needed
Have ready
- This page (nothing to install)
- A notebook for your robot's ideas
Grade 5 · ages 10 and 11 · no experience needed
Warm-up · think first
Be the robot! Your partner says: "Stand up. Turn around. Sit down." What happens if they forget to say "sit down"?
Show the answer
You stay standing! A robot does only what it is told, in order. Computers are the same.
Teacher tip: Play it out with a learner, then swap the order of the instructions.
🎮 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 one is not an instruction a robot could follow? (Walk 3 steps · Turn left · Feel happy · Pick up the pen)
Answer: "Feel happy" is the odd one. The others are exact steps. Robots need exact steps. - Would you rather teach a robot to make tea or to tidy a room? (Make tea · Tidy a room)
Answer: Either! Tea has clear steps in order. A tidy room has many choices to explain. Both need exact instructions. - A computer understands what you meant, even with a spelling mistake. (Always · Sometimes · Never)
Answer: Never. It follows exactly what you typed, so one wrong letter can stop a program. - Bolt's steps are in the wrong order: put on shoes, put on socks, go outside. What should change?
Answer: Socks go before shoes. Order matters: computers run lines from top to bottom. - What would you make a robot say first?
Answer: Anything friendly works. Collect ideas: you will type them in a minute.
Part 1 of 3 · learn, see, practise
print() makes the computer talk
Hi, I'm Bolt! I can't speak until you type print. Put your words in quotes, and I'll say them.
print() shows words on the screen. The words go inside the brackets and inside quotes.
Each print() starts a new line. Python runs your lines from top to bottom, one at a time.
🧑🏫 Teacher: type this live with the class
Make Bolt say hello
print("Hello!")Type slowly and say each part: print, open bracket, quote, Hello, quote, close bracket. Press Run. Bolt talks!
print("My name is Bolt.")Ask: where will this appear? Same line, or a new line? Vote, then run.
print("I love maths.")Ask a learner what Bolt should love instead. Change the word and run it again.
▶ Output
(nothing is printed)
📦 Memory boxes
▶ Output
Hello, class! Today we learn Python. Let's go!
📦 Memory boxes
Change the words to your own and press Run. Then swap two lines. What changes?
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 exactly: Hello, world!
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print("Hello, world!")1.2 Print exactly: I am learning Python
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print("I am learning Python")1.3 Print these two lines:
Good
morning
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print("Good")
print("morning")1.4 Finish the program so it prints Ready, Set, Go! on three lines.
▶ Output
Ready
📦 Memory boxes
Model answer (for the teacher)
print("Ready")
print("Set")
print("Go!")1.5 Print a tiny poem of four lines:
Roses are red
Violets are blue
Python is fun
And so are you
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print("Roses are red")
print("Violets are blue")
print("Python is fun")
print("And so are you")Part 2 of 3 · learn, see, practise
Bug hunt: fix Bolt's mistakes
Oops! When I see a mistake I stop and show red words. That is a bug, not a disaster. Good coders fix bugs all day!
A bug is a mistake in code. The red message tells you which line to look at.
The three most common bugs: a missing quote, a missing bracket, and a capital P in Print.
🧑🏫 Teacher: type this live with the class
Break it on purpose
print("I am fine")Run it: it works. Now delete the last quote, run it, and read the red message together. Put the quote back.
print("Still fine")Now change print to Print. Run it, read the message, then change it back. Bugs are normal!
▶ Output
(nothing is printed)
📦 Memory boxes
▶ Output
All the quotes match All the brackets close
📦 Memory boxes
Try removing a quote or bracket and read the error. Then fix it.
Practise it
Start with the warm-up and go as far as you can. The stretch questions are meant to be hard.
2.1 The closing quote is missing. Fix it so it prints Hello.
▶ Output
Line 1: SyntaxError: unterminated string literal
📦 Memory boxes
Model answer (for the teacher)
print("Hello")2.2 Python is fussy about capitals. Fix it so it prints Bolt.
▶ Output
Line 1: NameError: name 'Print' is not defined
📦 Memory boxes
Model answer (for the teacher)
print("Bolt")2.3 The closing bracket is missing. Fix it so it prints Robot.
▶ Output
Line 2: SyntaxError: expected ')'
📦 Memory boxes
Model answer (for the teacher)
print("Robot")2.4 Two bugs here! Fix both so it prints Bug free.
▶ Output
Line 1: SyntaxError: unterminated string literal
📦 Memory boxes
Model answer (for the teacher)
print("Bug free")2.5 Three lines, three bugs. Fix them so it prints One, Two, Three.
▶ Output
Line 1: SyntaxError: unterminated string literal
📦 Memory boxes
Model answer (for the teacher)
print("One")
print("Two")
print("Three")Part 3 of 3 · learn, see, practise
Pictures with text and *
Watch this! I can repeat a symbol as many times as you like. That's how I draw borders, rockets and rows of stars.
"*" * 5 means five stars in a row. It works with any text or emoji.
A line that starts with # is a comment. Python ignores it. It is a note for people.
🧑🏫 Teacher: type this live with the class
Draw a robot, line by line
# my robotComments are notes for people. Run it: nothing happens yet, and that's right!
print("=" * 12)Ask: how many = signs will we see? Vote, then run. Change 12 to 20.
print(" [o_o] ")The face. Spaces inside the quotes move it to the right.
print(" /| |\\ ")The arms. Two backslashes make one on the screen, so just copy this one.
print("🤖" * 3)Emoji work too! Ask for a favourite emoji and swap it in.
▶ Output
(nothing is printed)
📦 Memory boxes
▶ Output
/\ / \ |🚀| 🔥🔥🔥🔥
📦 Memory boxes
Change the emoji. Add a line of stars at the top with "⭐" * 4.
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 10 stars in one line, using * to repeat.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print("*" * 10)3.2 Print a line of 15 dashes, using *.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print("-" * 15)3.3 Print a banner: a line of 8 = signs, then HELLO, then 8 = signs again.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print("=" * 8)
print("HELLO")
print("=" * 8)3.4 Draw a stair with 1, 2 and 3 stars on three lines, using * each time.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
print("*" * 1)
print("*" * 2)
print("*" * 3)3.5 Add a comment at the top, then print a tree: a line of 1 🌟, then 3 🌲, then 5 🌲.
▶ Output
(nothing is printed)
📦 Memory boxes
Model answer (for the teacher)
# my tree
print("🌟" * 1)
print("🌲" * 3)
print("🌲" * 5)Watch out
Common mistakes
Forgetting the quotes
print(Hello) stops with an error. Words need quotes: print("Hello").
Print with a capital P
Python only knows print with a small p.
Quotes that don't match
Every opening quote needs a closing quote on the same line.
Thinking comments will show
A line starting with # never appears on the screen. That's the point!
Class activity 1 of 3
Robot name badge
Make a badge for your own robot. Follow the numbered steps in the boilerplate, one at a time.
- Print a top border of 20 = signs.
- Print your robot's name and its job on two lines.
- Print a row of emoji with *.
- Print a bottom border and press Check.
▶ Output
(nothing is printed)
📦 Memory boxes
Hint
Each step is one print line. Step 1 is print("=" * 20).
Model answer (for the teacher)
# ===== Robot name badge =====
print("=" * 20)
print("Name: Sparky")
print("Job: Homework helper")
print("🤖" * 5)
print("=" * 20)Class activity 2 of 3
Emoji story
Tell a four-line story with words and emoji. Bolt reads it out from top to bottom.
- Write line 1: who is in the story.
- Write line 2: where they go.
- Write line 3: what goes wrong.
- Write line 4: how it ends, with a row of emoji.
▶ Output
(nothing is printed)
📦 Memory boxes
Hint
You can join text and repeated emoji with +: print("The End" + "⭐" * 3).
Model answer (for the teacher)
# ===== Emoji story =====
print("A tiny dragon 🐉 wanted a snack.")
print("It flew to the kitchen 🍕.")
print("Oh no, it sneezed fire 🔥!")
print("Now the pizza is extra crispy.")
print("The End" + "⭐" * 3)Class activity 3 of 3
Bug squad
This program has five bugs. Fix them all. It should print the badge shown below when it works.
BUG SQUAD
*****
All clear!
- Press Run and read the red message.
- Fix that one bug and press Run again.
- Repeat until there is no red.
- Press Check.
▶ Output
Line 1: SyntaxError: unterminated string literal
📦 Memory boxes
Hint
Line 1 has two bugs. Line 2 needs a bracket. Line 3 needs a quote.
Model answer (for the teacher)
print("BUG SQUAD")
print("*" * 5)
print("All clear!")After class · project
My comic poster
Make a poster about your favourite thing, drawn in Python. It must have a border, a title, three facts and an emoji picture. Finish the boilerplate at home.
What to make: A Python program with no errors that prints a poster of at least 8 lines.
Stretch: Add a second poster below the first, with a different emoji border.
How it is marked
| Look for | Done well when |
|---|---|
| Runs | No red error when you press Run |
| Border | Borders are made with * |
| Facts | Three facts on three lines |
| Picture | At least two rows of emoji |
| Comments | A comment above each section |
Starter code to take home
Press Copy and paste it into the editor at home, or work on it right here.
▶ Output
======================== MY FAVOURITE THING
📦 Memory boxes
🔑 Show one possible solution (try it yourself first!)
▶ Output
========================
ALL ABOUT TIGERS
========================
Tigers love to swim.
Every tiger's stripes are different.
A tiger can eat 20 kg in one meal.
🐯🐯🐯🐯🐯🐯
🌿🌿🌿🌿🌿🌿🌿🌿🌿🌿🌿🌿
========================📦 Memory boxes
Homework
Practise at home
Each one checks itself. Or print the practice sheet.
1. Print your favourite food on one line, exactly: My favourite food is pizza
▶ Output
(nothing is printed)
📦 Memory boxes
2. Print a row of 6 hearts ❤ using *.
▶ Output
(nothing is printed)
📦 Memory boxes
3. Fix the bugs so it prints Homework done!
▶ Output
Line 2: SyntaxError: expected ')'
📦 Memory boxes
4. Print a three-line address label:
To: Bolt
Robot Street
Planet Python
▶ Output
(nothing is printed)
📦 Memory boxes
5. Draw a triangle of stars with 1, 3 and 5 stars. Use spaces to centre it:
*
***
*****
▶ Output
(nothing is printed)
📦 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 a tiny poem of four lines:
- Stretch task 2: Three lines, three bugs. Fix them so it prints One, Two, Three.
- Stretch task 3: Add a comment at the top, then print a tree: a line of 1 🌟, then 3 🌲, then 5 🌲.
🧠 Think-hard question
Print a square of stars with a hollow middle, five stars wide and three lines tall.
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 | print() makes the computer talk | 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 | Bug hunt: fix Bolt's mistakes | 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 | Pictures with text and * | 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 | Robot name badge | Show the boilerplate and read the numbered steps. Let them press Check often. | Follow the steps. |
| 42–49 min | Emoji story | Do step 1 together, then let them finish. | Finish the activity. |
| 49–54 min | Bug squad | 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 print do?
- What are the three bugs we hunted?
- Why does Python ignore a line with #?
If it feels hard
Sit with the learner for the first type-along and let them press Run every line. Keep the keyboard theirs. If typing is slow, start with the bug hunts, which need only one or two keys.
If it feels easy
Print a square of stars with a hollow middle, five stars wide and three lines tall.
FAQ
Hello, Python! Make the computer talk: questions
Can a Grade 5 student learn Python?
Yes. At 10 or 11, Python's plain words are easy to read. Starting with print lets learners see a result from their first line.
Do we need to install anything?
No. All the code runs on this page, in the browser, on a laptop or a tablet.
What if my child makes a mistake?
Mistakes are part of coding. The red message points to the line, and the lesson teaches how to read it and fix it.
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