import turtle
screen = turtle.Screen()
screen.setup(400, 400)
screen.bgcolor('skyblue')
pen = turtle.Turtle()
pen.hideturtle()
pen.speed(0)
def draw_circle(radius, color):
pen.penup()
pen.goto(0, -radius)
pen.pendown()
pen.color(color)
pen.begin_fill()
pen.circle(radius)
pen.end_fill()
draw_circle(100, 'red')
draw_circle(70, 'white')
draw_circle(40, 'red')
screen.mainloop()
Project 2 — Step 1 of 5
⭐ Step 1 — Draw the target
➡️ Draw an archery target made of three rings.
A target is just three circles of different sizes, stacked:
big red, medium white, small red. Turtle draws circles with
pen.circle(radius).
To draw three concentric circles, we’ll write a little helper
function draw_circle(radius, color) so we don’t have to repeat
the same 6 lines three times.
✏️ What to type
In the editor below, between pen.speed(0) and screen.mainloop(),
add this:
def draw_circle(radius, color):
pen.penup()
pen.goto(0, -radius)
pen.pendown()
pen.color(color)
pen.begin_fill()
pen.circle(radius)
pen.end_fill()
draw_circle(100, 'red')
draw_circle(70, 'white')
draw_circle(40, 'red')
import turtle
screen = turtle.Screen()
screen.setup(400, 400)
screen.bgcolor('skyblue')
pen = turtle.Turtle()
pen.hideturtle()
pen.speed(0)
# Add draw_circle() function and three draw_circle() calls here
screen.mainloop()
Tap ▶ Run. You should see a red and white bullseye in the middle of a sky-blue square. 🎯
🔍 Tip
pen.goto(0, -radius) first — turtle draws circles upward
from where the pen is, so we start at the bottom of the circle
to end up centred on (0, 0).
💡 If you get a red error
- Check the
defline ends with():. - Make sure the body lines are pushed in by 4 spaces (use Tab).
Adapted from Raspberry Pi Foundation — Target Practice under CC BY-SA 4.0.