main.pyshapes.py

You can edit this code and run it right here in the browser!

First we'll import some turtles and shapes:

This is a custom module we've made.

Modules are files full of code that you can import into your programs.

Images

Image Library

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")

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.

Add to Group

Decide which group to add this trinket below. You don't have any groups that you can add a trinket to — try creating a new one! You can also create a new group.

Trinket Settings

Enable Editor Autofocus

Global Settings

Enable Line Wrapping

Python Settings

Indentation Amount
(Doesn't update existing code!)
  • 2 spaces
  • 4 spaces