1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# You can edit this code and run it right here in the browser!
# First we'll import some turtles and shapes:
from turtle import *
from shapes import *
# Create a turtle named Tommy:
tommy = Turtle()
tommy.shape("turtle")
tommy.speed(7)
# Draw three circles:
draw_circle(tommy, "green", 50, 25, 0)
draw_circle(tommy, "blue", 50, 0, 0)
draw_circle(tommy, "yellow", 50, -25, 0)
# Write a little message:
tommy.penup()
tommy.goto(0,-50)
tommy.color("black")
tommy.write("Teach With Code!", None, "center", "16pt bold")
tommy.goto(0,-80)
# Try changing draw_circle to draw_square, draw_triangle, or draw_star
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Adding or removing images is disabled during broadcasting. You'll be able to update images again once the broadcast session is over.

Images listed here are available to use in your code in this trinket. Click the Image Library button to include more or upload new images.

How To Use Images

Images can be used with the turtle module.

import turtle
screen = turtle.Screen()
# set the screen background
screen.bgpic("filename.png")

# Or, set the shape of a turtle
screen.addshape("filename.png")
tina = turtle.Turtle()
tina.shape("filename.png")

Powered by

Run your code first!

It looks like you haven't tried running your new code.

Try clicking  Run and if you like the result, try sharing again.

×