1.1 How to set up a turtle program

Topic

1.1 How to set up a turtle program

Topic Progress:

Turtle is a Python library that can be imported into your Python, to allow you to draw using code! The Turtle library is usually built into Python, and can, therefore, be used on Repl.it. To use Turtle in your Python module, you must first import the Turtle library using this line of code:

import turtle

This imports the entire Turtle library into your Python, so you are now able to use commands associated with this library. To create a screen for your turtle, and give your turtle a name, below the import line write:

s = turtle.getscreen()

t=turtle.Turtle()

Your screen is now created, and your turtle has a name, “t”. This simple name will save us doing a lot of typing later. You are now ready to begin moving your turtle!

@

Not recently active