🤖 Python Grade 5 · session 6 of 44 · 60 minutes · 🎁 free with an account
Loops and turtle art
Why type something 100 times? Tell Bolt to repeat it! Today you'll print patterns, make times tables and draw colourful art with a turtle.

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
- for and range(): repeat it9 min
- Meet the turtle9 min
- Loops + turtle = art9 min
- Times table machine7 min
- Countdown and pattern7 min
- Turtle flower5 min
- Quiz5 min
- Set the after-class project1 min
By the end you can
- Repeat lines with for and range()
- Use the loop number in sums
- Draw shapes with turtle
- Use a loop to make turtle art
Before you start
- Lesson 1: print()
- Lesson 3: variables and f-strings
Have ready
- This page
- Coloured pencils for planning a drawing (optional)
Grade 5 · ages 10 and 11 · no experience needed
Warm-up · think first
Walk a square: go forward 3 steps and turn right. How many times do you repeat that to get back to the start?
Show the answer
4 times. Four sides and four turns. Soon you'll tell a turtle to do exactly this in 3 lines.
Teacher tip: Have a learner walk it for real.
🎮 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 of these is not a loop in real life? (Days of the week · A song's chorus · Eating one apple · Hands going round a clock)
Answer: "Eating one apple" happens once. The others repeat over and over. - Would you rather write your name 100 times by hand, or write one line of code? (By hand · One line of code)
Answer: One line! That's why loops are a superpower. - range(5) counts 1, 2, 3, 4, 5. (Always · Sometimes · Never)
Answer: Never — Never. It counts 0, 1, 2, 3, 4: five numbers, starting at 0. - To draw a triangle, a turtle goes forward, then turns. How many degrees must it turn each time?
Answer: 120. It turns 360 degrees in all, over 3 corners, and 360 ÷ 3 is 120. - What could you draw with only straight lines and turns?
Answer: Houses, stars, spirals, robots! Plan one for the project.
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 Square Code
Run the lesson's square turtle art code with for i in range(4). Watch the turtle draw a shape and see what each loop turn makes.
- 🔧
Level 2 · Tweak it
Change the Loop Number
Change range(4) to range(6) or change the turn angle. Predict the new turtle art, then run it and check.
- 🛠️
Level 3 · Build it
Build Your Turtle Art
Make your own turtle art loop. Pick a shape or spiral, write a for loop with range, and test your design.
Part 1 of 3 · learn, see, practise
for and range(): repeat it
Tell me once and I'll repeat it for ever! A for loop runs the moved-in lines again and again, and i tells you which time it is.
for i in range(5): runs the moved-in lines 5 times. It needs a colon and 4 spaces, like if.
i holds the count, starting at 0: 0, 1, 2, 3, 4.
range(1, 6) counts 1, 2, 3, 4, 5: it stops just before the last number.
🧑🏫 Teacher: type this live with the class
Bolt repeats
for i in range(3):A colon, like if. Press Enter and see the indent. Say: repeat 3 times.
print("Hip hip hooray!")Run it. Change 3 to 30!
for i in range(1, 6):A new loop, back on the left. Ask: what will it count?
print(i)Run it. Notice it stops before 6.
print("Blast off!")Not moved in, so it happens once, after the loop.
▶ Output
(nothing is printed)
📦 Memory boxes
▶ Output
⭐ ⭐⭐ ⭐⭐⭐ ⭐⭐⭐⭐ ⭐⭐⭐⭐⭐ 1 x 7 = 7 2 x 7 = 14 3 x 7 = 21 4 x 7 = 28 5 x 7 = 35
📦 Memory boxes
5intn5intA growing star pattern and a times table, in four lines. Change 7 to your favourite number.
Puzzle break: count like Python
Python starts counting at 0. Count on your fingers as you read.
- Puzzle 1: say what happens before you run it
- Puzzle 2: fill the gap
- Puzzle 3: find the bug
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 Python is fun! 4 times with a loop.
▶ 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
for i in range(4): print("Python is fun!")
What it prints
Python is fun! Python is fun! Python is fun! Python is fun!
What ✓ Check looks for
- it prints exactly:
Python is fun! Python is fun! Python is fun! Python is fun!
- In the code: Use a for loop.
1.2 Print the numbers 1 to 5 with a loop.
▶ 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
for i in range(1, 6): print(i)
What it prints
1 2 3 4 5
What ✓ Check looks for
- it prints exactly:
1 2 3 4 5
- In the code: Use range().
1.3 Print the 5 times table from 5 x 1 = 5 up to 5 x 10 = 50.
▶ 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
for n in range(1, 11): print(f"5 x {n} = {n * 5}")
What it prints
5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20 5 x 5 = 25 5 x 6 = 30 5 x 7 = 35 5 x 8 = 40 5 x 9 = 45 5 x 10 = 50
What ✓ Check looks for
- it prints exactly:
5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20 5 x 5 = 25 5 x 6 = 30 5 x 7 = 35 5 x 8 = 40 5 x 9 = 45 5 x 10 = 50
- In the code: Use a loop.
1.4 Print a growing stair of stars, with 1, 2, 3, 4 and then 5 stars.
▶ 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
for i in range(1, 6): print("*" * i)
What it prints
* ** *** **** *****
What ✓ Check looks for
- it prints exactly:
* ** *** **** *****
- In the code: Use a loop.
1.5 Add up the numbers 1 to 100. Start with total = 0, add each number in a loop, then print exactly: Total: 5050
▶ Output
(nothing is printed)
📦 Memory boxes
0int🧑🏫 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
total = 0for n in range(1, 101): total += nprint(f"Total: {total}")
What it prints
Total: 5050
What ✓ Check looks for
- it prints exactly:
Total: 5050
- In the code: Add to total with +=.
- In the code: Use a loop.
🎁 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: Meet the turtle, with practice at three levels
- Part 3: Loops + turtle = art, with practice at three levels
- Class activity 1: Times table machine
- Class activity 2: Countdown and pattern
- Class activity 3: Turtle flower
- A 8-question quiz
- After-class project: My turtle art gallery
- 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
Loops and turtle art: questions
What is a for loop in simple words?
An instruction to repeat some lines. It saves you writing the same thing many times.
What is Python turtle?
A little drawing tool in Python. You give it moves and turns, and it draws lines. On this page, it draws right below your code.
Why does range start at 0?
Python counts from 0 by habit. Use range(1, 11) if you want 1 to 10.
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