Introducing Turtles

In this project, we’re going to use a library called the “turtle” library. This library will allow us to make turtle objects, that can be used to draw things on the screen. Whenever the turtle moves on the screen it will trace where it goes. Before we can do anything with the turtle, we’re first gonna have to import the turtle library into our code.

Make the following the first line of code in a new visual studio program. The “from” keyword tells python what library it should look in, and the “import” line tells our program what it should include from that library. “*” means that it will import the whole library

from turtle import *

Now we can use code from the turtle library! After we have imported it, define a new turtle object by doing the code on the right:

turtley = Turtle()

What we just did with this line was to make an object named “turtley”, from the class Turtle. You can interpret this line like “turtley is a turtle”.