Coding for Kids · Lesson

A Sun and Sky

Complete the scene.

Lesson 4 of 413 steps

A Sun and Sky is a free Coding for Kids lesson on CoddyKit. This is lesson 4 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, and your progress syncs across the web and the CoddyKit app. The Coding for Kids course includes 4 lessons in total.

Finish the Scene! ☀️🏠

Our house is almost done! Now let's add a SUN, a SKY, and some GRASS to make a whole picture! 🌅

By the end, you'll have a complete house scene! 🤩

import turtle

t = turtle.Turtle()
t.dot(50, 'yellow')

A Blue Sky 💙

First, let's paint the whole background sky blue! ☁️

Use turtle.bgcolor('skyblue') and the whole screen turns into a sky!

import turtle

turtle.bgcolor('skyblue')
t = turtle.Turtle()
t.forward(100)

Draw the Sun ☀️

The sun is a big yellow circle. The easiest way is t.dot(60, 'yellow')!

The first number is the size, the second is the color. Bright and warm! 🌞

import turtle

turtle.bgcolor('skyblue')
t = turtle.Turtle()
t.penup()
t.goto(-150, 120)
t.dot(60, 'yellow')

Sun Rays! 🌟

The sun needs rays shining out! ✨

We draw little lines spinning around the sun. A loop turns 45 degrees each time for 8 rays!

import turtle

t = turtle.Turtle()
t.pencolor('orange')
t.pensize(3)
for i in range(8):
    t.forward(40)
    t.backward(40)
    t.right(45)

Green Grass 🌱

The house needs to stand on grass! 🌿

We draw a big green rectangle along the bottom. Green and leafy! 💚

import turtle

turtle.bgcolor('skyblue')
t = turtle.Turtle()
t.penup()
t.goto(-200, -100)
t.pendown()
t.fillcolor('green')
t.begin_fill()
for side in [400, 60, 400, 60]:
    t.forward(side)
    t.left(90)
t.end_fill()

Fluffy Clouds ☁️

Let's add fluffy white clouds! ☁️ A cloud is just a few white dots together.

We draw 3 dots close to each other and they look like a cloud!

import turtle

turtle.bgcolor('skyblue')
t = turtle.Turtle()
t.penup()
for x in [80, 120, 160]:
    t.goto(x, 100)
    t.dot(40, 'white')

Put the House In 🏠

Now we add our house! Walls and roof from the earlier lessons. 🏠

Let's draw the yellow walls first.

import turtle

turtle.bgcolor('skyblue')
t = turtle.Turtle()
t.fillcolor('lightyellow')
t.begin_fill()
for i in range(4):
    t.forward(120)
    t.left(90)
t.end_fill()

Build the Whole Scene! 🌅

Let's combine everything: sky, sun, grass, and the house! 🏠☀️

This is a big program but it's just all our pieces together. Look how nice! 🤩

import turtle

turtle.bgcolor('skyblue')
t = turtle.Turtle()
t.speed(0)
t.penup()
t.goto(-150, 120)
t.dot(60, 'yellow')
t.goto(-60, -60)
t.pendown()
t.fillcolor('lightyellow')
t.begin_fill()
for i in range(4):
    t.forward(120)
    t.left(90)
t.end_fill()

Add a Path to the Door 🛤️

A little path leads up to the door! 🚶

We draw a gray rectangle from the door down to the grass.

import turtle

t = turtle.Turtle()
t.fillcolor('gray')
t.begin_fill()
for side in [30, 80, 30, 80]:
    t.forward(side)
    t.left(90)
t.end_fill()

A Flying Bird 🐦

Let's add a little bird in the sky! 🕊️ A bird is just two small curves like the letter M.

We draw two little arcs with t.circle() using a small size!

import turtle

turtle.bgcolor('skyblue')
t = turtle.Turtle()
t.penup()
t.goto(50, 130)
t.pendown()
t.right(45)
t.circle(15, 90)
t.left(90)
t.circle(15, 90)

Make YOUR Scene! 🌅🎨

Your turn! Change the sky color, the sun color, and where things go. 🤩

Maybe a pink sunset sky? 🌸 Or a purple night with a moon? 🌙 You're the artist!

import turtle

turtle.bgcolor('pink')
t = turtle.Turtle()
t.penup()
t.goto(120, 120)
t.dot(70, 'orange')
t.goto(-200, -100)
t.pendown()
t.fillcolor('green')
t.begin_fill()
for side in [400, 60, 400, 60]:
    t.forward(side)
    t.left(90)
t.end_fill()

Quick Check ✅

Last brain teaser of the course! 🧠🌅

Scene Complete! 🏠☀️🎉

WOW! You built a whole house scene! 🤩 You finished the Draw a House course! You learned:

  • turtle.bgcolor('skyblue') for the sky 💙
  • t.dot(60, 'yellow') for the sun ☀️
  • Rectangles for grass and paths 🌱🛤️
  • Combining all your pieces into one big picture! 🖼️

You're a true coding artist! Keep building! 🐢🎨

Free to start

Learn Python with an AI tutor — free

Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.

Courses
35
Lessons
140

Frequently Asked Questions

Is the “A Sun and Sky” lesson free?

Yes — the full text of “A Sun and Sky” is free to read here on the web. 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. The Coding for Kids course includes 4 lessons in total.

What will I learn in “A Sun and Sky”?

Complete the scene. 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, so you can start here or from the beginning and move at your own pace. This is lesson 4 of 4.

How long does the “A Sun and Sky” 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

  1. Drawing a Square House
  2. Adding a Roof
  3. Doors and Windows
  4. A Sun and Sky
← Back to Coding for Kids