🤖 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.

🎯 Practice mode🖨 Print a worksheet

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.

See the teacher's plan
  1. Warm-up3 min
  2. Warm-up games5 min
  3. print() makes the computer talk9 min
  4. Bug hunt: fix Bolt's mistakes9 min
  5. Pictures with text and *9 min
  6. Robot name badge7 min
  7. Emoji story7 min
  8. Bug squad5 min
  9. Quiz5 min
  10. 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.

More warm-ups for every class →

🎮 Warm-up games · 5 quick games

Play with Bolt the robot

Five minutes with Bolt the robot. Vote, say why, then show the answer.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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

Listen to this part

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

  1. print("Hello!")

    Type slowly and say each part: print, open bracket, quote, Hello, quote, close bracket. Press Run. Bolt talks!

  2. print("My name is Bolt.")

    Ask: where will this appear? Same line, or a new line? Vote, then run.

  3. print("I love maths.")

    Ask a learner what Bolt should love instead. Change the word and run it again.

Type here

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
Example: run it, then change it

▶ Output

Hello, class!
Today we learn Python.
Let's go!

📦 Memory boxes

No variables yet

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.

Warm-up

1.1 Print exactly: Hello, world!

Task 1.1

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
Model answer (for the teacher)
print("Hello, world!")
Warm-up

1.2 Print exactly: I am learning Python

Task 1.2

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
Model answer (for the teacher)
print("I am learning Python")
Core

1.3 Print these two lines:
Good
morning

Task 1.3

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
Model answer (for the teacher)
print("Good")
print("morning")
Core

1.4 Finish the program so it prints Ready, Set, Go! on three lines.

Task 1.4

▶ Output

Ready

📦 Memory boxes

No variables yet
Model answer (for the teacher)
print("Ready")
print("Set")
print("Go!")
Stretch 🔥

1.5 Print a tiny poem of four lines:
Roses are red
Violets are blue
Python is fun
And so are you

Task 1.5

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
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

Listen to this part

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

  1. 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.

  2. print("Still fine")

    Now change print to Print. Run it, read the message, then change it back. Bugs are normal!

Type here

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
Example: run it, then change it

▶ Output

All the quotes match
All the brackets close

📦 Memory boxes

No variables yet

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.

Warm-up

2.1 The closing quote is missing. Fix it so it prints Hello.

Task 2.1

▶ Output

Line 1: SyntaxError: unterminated string literal

📦 Memory boxes

No variables yet
Model answer (for the teacher)
print("Hello")
Warm-up

2.2 Python is fussy about capitals. Fix it so it prints Bolt.

Task 2.2

▶ Output

Line 1: NameError: name 'Print' is not defined

📦 Memory boxes

No variables yet
Model answer (for the teacher)
print("Bolt")
Core

2.3 The closing bracket is missing. Fix it so it prints Robot.

Task 2.3

▶ Output

Line 2: SyntaxError: expected ')'

📦 Memory boxes

No variables yet
Model answer (for the teacher)
print("Robot")
Core

2.4 Two bugs here! Fix both so it prints Bug free.

Task 2.4

▶ Output

Line 1: SyntaxError: unterminated string literal

📦 Memory boxes

No variables yet
Model answer (for the teacher)
print("Bug free")
Stretch 🔥

2.5 Three lines, three bugs. Fix them so it prints One, Two, Three.

Task 2.5

▶ Output

Line 1: SyntaxError: unterminated string literal

📦 Memory boxes

No variables yet
Model answer (for the teacher)
print("One")
print("Two")
print("Three")

Part 3 of 3 · learn, see, practise

Pictures with text and *

Listen to this part

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

  1. # my robot

    Comments are notes for people. Run it: nothing happens yet, and that's right!

  2. print("=" * 12)

    Ask: how many = signs will we see? Vote, then run. Change 12 to 20.

  3. print(" [o_o] ")

    The face. Spaces inside the quotes move it to the right.

  4. print(" /| |\\ ")

    The arms. Two backslashes make one on the screen, so just copy this one.

  5. print("🤖" * 3)

    Emoji work too! Ask for a favourite emoji and swap it in.

Type here

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
Example: run it, then change it

▶ Output

  /\  
 /  \ 
 |🚀| 
🔥🔥🔥🔥

📦 Memory boxes

No variables yet

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.

Warm-up

3.1 Print 10 stars in one line, using * to repeat.

Task 3.1

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
Model answer (for the teacher)
print("*" * 10)
Warm-up

3.2 Print a line of 15 dashes, using *.

Task 3.2

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
Model answer (for the teacher)
print("-" * 15)
Core

3.3 Print a banner: a line of 8 = signs, then HELLO, then 8 = signs again.

Task 3.3

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
Model answer (for the teacher)
print("=" * 8)
print("HELLO")
print("=" * 8)
Core

3.4 Draw a stair with 1, 2 and 3 stars on three lines, using * each time.

Task 3.4

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
Model answer (for the teacher)
print("*" * 1)
print("*" * 2)
print("*" * 3)
Stretch 🔥

3.5 Add a comment at the top, then print a tree: a line of 1 🌟, then 3 🌲, then 5 🌲.

Task 3.5

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
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.

  1. Print a top border of 20 = signs.
  2. Print your robot's name and its job on two lines.
  3. Print a row of emoji with *.
  4. Print a bottom border and press Check.
Your code

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
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.

  1. Write line 1: who is in the story.
  2. Write line 2: where they go.
  3. Write line 3: what goes wrong.
  4. Write line 4: how it ends, with a row of emoji.
Your code

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
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!

  1. Press Run and read the red message.
  2. Fix that one bug and press Run again.
  3. Repeat until there is no red.
  4. Press Check.
Your code

▶ Output

Line 1: SyntaxError: unterminated string literal

📦 Memory boxes

No variables yet
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 forDone well when
RunsNo red error when you press Run
BorderBorders are made with *
FactsThree facts on three lines
PictureAt least two rows of emoji
CommentsA 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.

Project starter

▶ Output

========================
   MY FAVOURITE THING   

📦 Memory boxes

No variables yet
🔑 Show one possible solution (try it yourself first!)
One possible solution

▶ 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

No variables yet

Homework

Practise at home

Each one checks itself. Or print the practice sheet.

Warm-up

1. Print your favourite food on one line, exactly: My favourite food is pizza

Homework 1

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
Warm-up

2. Print a row of 6 hearts ❤ using *.

Homework 2

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
Core

3. Fix the bugs so it prints Homework done!

Homework 3

▶ Output

Line 2: SyntaxError: expected ')'

📦 Memory boxes

No variables yet
Core

4. Print a three-line address label:
To: Bolt
Robot Street
Planet Python

Homework 4

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet
Stretch 🔥

5. Draw a triangle of stars with 1, 3 and 5 stars. Use spaces to centre it:
*
***
*****

Homework 5

▶ Output

(nothing is printed)

📦 Memory boxes

No variables yet

🔥 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.

🧠 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.

1What does this show?
print("Hello")
Show the answer

Hello. print shows the words inside the quotes, without the quotes.

2What does this show?
print("ha" * 3)
Show the answer

hahaha. * repeats the text three times with no spaces.

3Which line is correct?
Show the answer

print("Hi"). Small p, brackets, and quotes that match.

4Which line does Python ignore?
Show the answer

# draw a cat. A line starting with # is a comment.

5How many lines does this show?
print("A")
# nothing
print("B")
Show the answer

2. The comment is ignored, so two print lines show.

6What is a bug?
Show the answer

A mistake in the code. A bug is a mistake. Everyone makes them, and you fix them.

7What does this show?
print("*" * 5)
Show the answer

*****. Five stars in a row.

8Which runs first?
Show the answer

The top line. Python runs from top to bottom.

🖨 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.

Include
Options

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.

TimePartThe teacherThe learner
0–3 minWarm-upAsk the question and wait for a guess before any hint.Guess, then explain.
3–8 minWarm-up gamesPlay three or four games. Ask for a reason each time.Vote and say why.
8–17 minprint() makes the computer talkDo the type-along first: type each line, say the words, run it. Then show the example.Type along, then do the practice.
17–26 minBug hunt: fix Bolt's mistakesDo the type-along first: type each line, say the words, run it. Then show the example.Type along, then do the practice.
26–35 minPictures 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 minRobot name badgeShow the boilerplate and read the numbered steps. Let them press Check often.Follow the steps.
42–49 minEmoji storyDo step 1 together, then let them finish.Finish the activity.
49–54 minBug squadIf time is short, set it as homework.Try the challenge.
54–59 minQuizRead each question aloud. Vote, then check.Answer and read why.
59–60 minSet the after-class projectOpen 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

For a child’s class, please have a parent or guardian send the enquiry. Avoid sharing passwords or sensitive personal details.

We’ll use your details only to respond to this request.

Chat on WhatsApp
Esc

Try