Turtle Colors
Choose pen colors.
Turtle Colors is a free Coding for Kids lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Coding for Kids learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Meet the Color Turtle! 🐢🎨
Get ready to paint with a turtle! 🐢 In Python we have a tool called turtle that lets us draw on the screen.
The turtle holds a magic pen. When it walks, it leaves a colorful line behind it! ✏️🌈
import turtle
t = turtle.Turtle()
t.forward(100)A Pen That Changes Color
Right now the turtle draws in black. Boring! 😴
We can change the pen color with t.pencolor('red'). Now everything it draws is RED! ❤️
import turtle
t = turtle.Turtle()
t.pencolor('red')
t.forward(100)So Many Colors! 🌈
You can pick lots of colors by name:
'red'❤️'blue'💙'green'💚'purple'💜'orange'🧡
Just put the color name inside the quotes!
import turtle
t = turtle.Turtle()
t.pencolor('blue')
t.forward(120)Change Color Anytime
You can change colors as many times as you want while drawing! 🎨
Draw a bit in one color, switch, then draw more in another color. Watch the rainbow appear!
import turtle
t = turtle.Turtle()
t.pencolor('red')
t.forward(60)
t.pencolor('green')
t.forward(60)Make the Pen Thicker ✒️
A thin line is hard to see. Let's make a fat pen!
Use t.pensize(5). The bigger the number, the thicker the line! Try 10 for super chunky lines. 💪
import turtle
t = turtle.Turtle()
t.pensize(8)
t.pencolor('purple')
t.forward(100)Turn and Color a Corner
Let's draw a colorful corner! 📐
Move forward, turn with t.right(90) (a quarter turn), then move again in a new color.
import turtle
t = turtle.Turtle()
t.pencolor('orange')
t.forward(80)
t.right(90)
t.pencolor('blue')
t.forward(80)A Colorful Triangle 🔺
Three sides, three colors! Let's draw a triangle where each side is a different color.
We turn 120 degrees at each corner to make a triangle.
import turtle
t = turtle.Turtle()
t.pencolor('red')
t.forward(100)
t.left(120)
t.pencolor('green')
t.forward(100)
t.left(120)
t.pencolor('blue')
t.forward(100)Change the Background 🖼️
You can even color the WHOLE screen behind your turtle!
Use turtle.bgcolor('lightblue'). Now your drawing has a sky behind it! ☁️
import turtle
turtle.bgcolor('lightblue')
t = turtle.Turtle()
t.pencolor('yellow')
t.forward(100)Speed It Up! 🏎️
Want your turtle to draw FAST? Use t.speed(0) for super speed! 💨
Or t.speed(1) to watch it go slow and see every step.
import turtle
t = turtle.Turtle()
t.speed(0)
t.pencolor('magenta')
t.forward(150)Color Names Are Just Words
Remember: the color goes inside quotes like 'pink'. 🩷
If you spell it wrong (like 'redd'), the turtle gets confused! Spelling matters. ✅
import turtle
t = turtle.Turtle()
t.pencolor('pink')
t.pensize(6)
t.forward(100)Make Your Own Color Line!
Now YOU choose! Pick your favorite color and a pen size. 🌟
Change 'green' to any color you like and change the number in pensize. Have fun! 🎉
import turtle
t = turtle.Turtle()
t.pensize(10)
t.pencolor('green')
t.forward(140)Quick Check ✅
Time for a quick brain teaser! 🧠
You Did It! 🎉🐢
Awesome work, color artist! Today you learned:
t.pencolor('red')changes the pen color 🎨t.pensize(5)makes the line thicker ✒️turtle.bgcolor('lightblue')colors the background 🖼️- Color names go inside quotes
Next up: filling shapes with color! 🌈
Frequently asked questions
Is the “Turtle Colors” lesson free?
Yes — the full text of “Turtle Colors” is free to read here on the web, and the Coding for Kids course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Coding for Kids course, upgrade to CoddyKit PRO.
What will I learn in “Turtle Colors”?
Choose pen colors. You practise Coding for Kids with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Coding for Kids?
No prior experience is required. Coding for Kids on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Turtle Colors” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Coding for Kids lesson?
Yes. Every Coding for Kids lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Turtle Colors
- Filling Shapes
- Many Shapes
- A Colorful Pattern