Course Introduction

Install Python

Learn the Basics Through Visual Exercises

The Power of Functions

Project: Circle of Squares

Data Types (Let's Learn Some Adult Programming Stuff)

Conditionals and Control Flow

Exercises (a.k.a Drill and Kill)

Video and Written Solutions for Exercises

Project 2: Rock Paper Scissors

## 165 comments

# Make a square with the turtle.

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my.turtle.forward(100)

Traceback (most recent call last):

File "", line 1, in

my.turtle.forward(100)

NameError: name 'my' is not defined

>>> my_turtle.forward(100)

>>> my_turtle.forward(100)

>>> my_turtle.left(100)

>>> my.turtle.forward(100)

>>> my_turtle.forward(100)

>>> my_turtle.forward(100)

>>> my_turtle.left(100)

>>> myturtle.forward(100)

my_turtle.forward(100)

>>> my_turtle.forward(100)

>>> my_turtle.left(100)

>>> my_turtle.forward(100)

>>> my.turtle.forward(50)

my_turtle.forward(50)

import turtle

my_turtle =turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle. forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

just wanted to ask how do you open the python graphics thing???? at 2:02

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90+45)

my_turtle.forward(143)

my_turtle.right(90+45)

my_turtle.forward (100)

my_turtle.right(90)

my_turtle.forward (100)

my_turtle. forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

https://trinket.io/python/7f57e676a5

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

So satisfying :)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward (100)

my_turtle.left (90+45)

my_turtle.forward (100)

my_turtle = turtle.Turtle()

my_turtle.forward(50)

my_turtle.right(90)

my_turtle.forward(50)

my_turtle.right(90)

my_turtle.forward(50)

my_turtle.right(90)

my_turtle.forward(50)

# Make a square with the turtle.

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

>>>

>>>

>>> my_turtle = turtle.Turtle()

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turle.forward(100)

Traceback (most recent call last):

File "", line 1, in

my_turle.forward(100)

NameError: name 'my_turle' is not defined

>>> my_turtle.forward(100)

>>>

you mistakenly typed :turle in the last step..

that would be it..

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(360+90)

my_turtle.forward(100)

my_turtle.right(270)

my_turtle.forward(100)

my_turtle.left(360+90)

my_turtle.forward(100)

my_turtle.left(135)

my_turtle.forward(141.4213562)

my_turtle.right(180)

my_turtle.forward(141.4213562)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.backward(100)

>>> my_turtle.left(90)

>>> my_turtle.backward(100)

>>> my_turtle.left(90)

>>> my_turtle.backward(100)

I don't get why my code is not working. any help would be great I'm new.

>>>

>>> turtle.forward(100)

>>> turtle.right(90)

>>> turtle.forward(100)

>>> turtle.right(90)

>>> turtle.forward(100)

>>> turtle.right(90)

>>> turtle.forward(100)

>>>

# Make a square with the turtle.

myTurtle = turtle.Turtle()

myTurtle.forward(100)

myTurtle.left(90)

myTurtle.forward(100)

myTurtle.left(90)

myTurtle.forward(100)

myTurtle.left(90)

myTurtle.forward(100)

>>> my_turtle = turtle.Turtle()

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>>

my_turtle=turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

import turtle

turtle=turtle.Turtle()

turtle.forward(100)

turtle.right(90)

turtle.forward(100)

turtle.right(90)

turtle.forward(100)

turtle.right(90)

turtle.forward(100)

But if I try to run it as a full script it doesn't work and python can't compile it.

Traceback (most recent call last):

File "turtle.py", line 1, in

import turtle

File "/home/parusch/Desktop/python/turtle.py", line 2, in

first_turtle = turtle.Turtle()

AttributeError: module 'turtle' has no attribute 'Turtle'

Why is that?

Nvm I am dumb. Guys, if you save the file, don't call it turtle.py! Otherwise it will try to read from it and take it as the standard library module. So if you wanna create a file don't use that name.

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

>>>

>>>

>>>

>>> my_turtle = turtle.Turtle()

>>> my_turtle.forward(50)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(50)

>>>

>>>

>>>

>>> my_turtle = turtle.Turtle()

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>>

>>>

>>>

>>> my_turtle = turtle.Turtle()

>>> my_turtle.forward(100)

>>> my_turtle.right(90)

>>> my_turtle.forward(100)

>>> my_turtle.right(90)

>>> my_turtle.forward(100)

>>> my_turtle.right(90)

>>> my_turtle.forward(100)

Link

https://trinket.io/python/5f6a74dca4

>>> myturtle.forward(100)

>>> myturtle.left(90)

>>> myturtle.forward(100)

>>> myturtle.left(90)

>>> myturtle.forward(100)

>>> myturtle.left(90)

>>> myturtle.forward(100)

# Make a square with the turtle.

a=turtle.Turtle()

a.forward(100)

a.left(90)

a.forward(100)

a.left(90)

a.forward(100)

a.left(90)

a.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(400)

my_turtle.left(90)

my_turtle.forward(400)

my_turtle.left(90)

my_turtle.forward(400)

my_turtle.left(90)

my_turtle.forward(400)

a = turtle.Turtle()

b = turtle.Turtle()

c = turtle.Turtle()

d = turtle.Turtle()

a.speed(10)

b.speed(10)

c.speed(10)

d.speed(10)

a.forward(100)

a.right(90)

a.forward(100)

b.left(180)

b.forward(100)

b.right(90)

b.forward(100)

c.left(90)

c.forward(100)

c.right(90)

c.forward(100)

d.right(90)

d.forward(100)

d.right(90)

d.forward(100)

# Make a square with the turtle.

#Swastika Lol

a.right(90)

a.forward(100)

b.right(90)

b.forward(100)

c.right(90)

c.forward(100)

d.right(90)

d.forward(100)

a.right(90)

a.forward(100)

a.right(90)

a.forward(100)

#now i got 4 squares

b.clear()

c.clear()

d.clear()

a.hideturtle()

b.hideturtle()

c.hideturtle()

d.hideturtle()

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

Snake = turtle.Turtle()

turtle.forward(100)

turtle.left(90)

turtle.forward(100)

turtle.left(90)

turtle.forward(100)

turtle.left(90)

turtle.forward(100)

turtle.left(90)

Last turn was simply to satisfy my OCD.

" snake = turtle.Turtle ()

snake.forward (100) "

it says : Traceback (most recent call last):

File "", line 1, in

sanke.forward(100)

NameError: name 'sanke' is not defined

ty tho might've saved me from a lot of trouble in the future

>>> my_turtle = turtle.Turtle()

>>> my_turtle.forward(100)

>>> my_turtle.left

>

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>>

>>> my_turtle = turtle.Turtle()

>>> my_turtle.forward(100)

>>> my_turtle.left

>

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>>

Ubica=turtle.Turtle()

Ubica.forward(100)

Ubica.left(90)

Ubica.forward(100)

Ubica.left(90)

Ubica.forward(100)

Ubica.left(90)

Ubica.forward(100)

ameer=turtle.Turtle()

ameer.forward(100)

ameer.left(90)

ameer.forward(100)

ameer.left(90)

ameer.forward(100)

ameer.left(90)

ameer.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

# Make a square with the turtle.

kashish = turtle.Turtle()

kashish.forward(100)

kashish.right(90)

kashish.forward(100)

kashish.right(90)

kashish.forward(100)

kashish.right(90)

kashish.forward(100)

>>> import turtle

>>> my_turtle = turtle.Turtle()

>>> my_turtle.forward(200)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forwad(100)

Traceback (most recent call last):

File "", line 1, in

my_turtle.forwad(100)

AttributeError: 'Turtle' object has no attribute 'forwad'

>>> my_turtle.forward(100)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(200)

>>>

#The Turtle import, lets you draw a path creating wonderful masterpieces, Try it here.

import turtle

#You can Rename your turtle using Variables. Try it out.

Peter = turtle.Turtle()

#Peter can move according to my command. Watch This.

Peter.forward(100)

#Peter can also turn left and right. Look at Peter go!!

Peter.left(90)

Peter.forward(100)

Peter.left(90)

Peter.forward(100)

Peter.left(90)

Peter.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(120)

>>> my_turtle.left(90)

>>> my_turtle.forward(120)

>>> my_turtle.left(90)

>>> my_turtle.forward(120)

# Make a square with the turtle.

my_turtle=turtle.Turtle()

my_turtle.forward(100)

my_turtle.right(90)

my_turtle.forward(100)

my_turtle.right(90)

my_turtle.forward(100)

my_turtle.right(90)

my_turtle.forward(100)

# Make a square with the turtle.

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.left(45)

my_turtle.forward(150)

my_turtle.left(90)

my_turtle.forward(150)

my_turtle.left(90)

my_turtle.forward(150)

my_turtle.left(90)

my_turtle.forward(150)

# Make a square with the turtle.

my_turtle=turtle.Turtle()

my_turtle.forward(200)

my_turtle.left(90)

my_turtle.forward(200)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(200)

my_turtle = turtle.Turtle()

my_turtle.forward(200)

my_turtle.left(90)

my_turtle.forward(200)

my_turtle.left(90)

my_turtle.forward(200)

my_turtle.left(90)

my_turtle.forward(200)

import turtle

my_turtle = turtle.Turtle()

my_turtle.forward(50)

my_turtle.right(45)

my_turtle.forward(50)

my_turtle.right(45)

my_turtle.forward(50)

my_turtle.right(45)

my_turtle.forward(50)

my_turtle.right(45)

my_turtle.forward(50)

my_turtle.right(45)

my_turtle.forward(50)

my_turtle.right(45)

my_turtle.forward(50)

my_turtle.right(45)

my_turtle.forward(50)

my_turtle.right(45)

# Make a square with the turtle.

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my square

import turtle

my_turtle = turtle.Turtle()

moving = 1

while moving my_turtle.forward(200)

my_turtle.left(89)

moving = moving + 1

>>> my_turtle = turtle.Turtle()

>>> my_turtle.forward(200)

>>> my_turtle.left(90)

>>> my_turtle.forward(200)

>>> my_turtle.left(90)

>>> my_turtle.forwards(200)

Traceback (most recent call last):

File "", line 1, in

my_turtle.forwards(200)

AttributeError: 'Turtle' object has no attribute 'forwards'

>>> my_turtle.forward (200)

>>> my_turtle.left (200)

>>> my_turtle.right (200)

>>> my_turtle right(90)

SyntaxError: invalid syntax

>>> my_turtle.right (90)

>>> my_turtle.left(180)

>>> my_turtle.forward(200)

>>>

i typed to fast sometimes hehe

my_turtle=turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(170)

my_turtle.left(90)

my_turtle.forward(170)

my_turtle.left(90)

my_turtle.forward(170)

my_turtle.left(90)

my_turtle.forward(170)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

import turtle

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

import turtle

>>> my_turtle = turtle.Turtle()

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

It worked on my Mac for Python but not for the site. Is that normal sir?

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>>

my_turtle = turtle.Turtle()

my_turtle.forward(100)

turtle.left(90)

turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

turtle.right(90)

my_turtle.forward(100)

turtle.forward(100)

turtle = turtle.Turtle()

def square():

for i in range(0, 4):

turtle.forward(100)

turtle.right(90)

square()

>>> my_square = turtle.Turtle()

>>> my_square.forward(100)

>>> my_square.left(90)

>>> my_square.forward(100)

>>> my_square.left(90)

>>> my_square.forward(100)

>>> my_square.left(90)

>>> my_square.forward(100)

>>> my_turtle=turtle.Turtle()

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle=turtle.Turtle()

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle=turtle.Turtle

turtle.foward(500)

i used win 10 its doest work it shows

AttributeError: '' object has no attribute 'foward' on line 3 in main.py

please give solution of my problem

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

How I can fined Python Turtle Graphics ?

I'm using windows 10 and python 3.6 !

dj = turtle.Turtle()

dj.forward(100)

dj.left(90)

for x in range(0,3):

dj.forward(100)

dj.left(90)

x+=1

# Make a square with the turtle.

my_turtle = turtle.Turtle()

#moves turtle forward 75

my_turtle.forward(75)

#rotates turtle 90 degrees right

my_turtle.right(90)

#moves turtle forward 75

my_turtle.forward(75)

#rotates turtle 90 degrees right

my_turtle.right(90)

#moves turtle forward 75

my_turtle.forward(75)

#rotates turtle 90 degrees right

my_turtle.right(90)

#moves turtle forward 75

my_turtle.forward(75)

#rotates turtle 90 degrees right

my_turtle.right(90)

my_turtle = turtle.Turtle()

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

# Make a square with the turtle.

# Kilpikonna is turtle in finnish so don't think i'm crazy

Kiplikonna = turtle.Turtle()

Kiplikonna.forward(100)

Kiplikonna.left(90)

Kiplikonna.forward(100)

Kiplikonna.left(90)

Kiplikonna.forward(100)

Kiplikonna.left(90)

Kiplikonna.forward(100)

>>> my_turtle = turtle.Turtle()

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>>

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle ()

my_turtle.forward (100)

my_turtle.left (90)

my_turtle.forward (100)

my_turtle.left (90)

my_turtle.forward (100)

my_turtle.left (90)

my_turtle.forward (100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(200)

my_turtle.right(150)

my_turtle.forward(200)

my_turtle.right(150)

my_turtle.forward(200)

my_turtle.right(150)

my_turtle.forward(200)

my_turtle.right(135)

my_turtle.forward(190)

>>> my_turtle.forward(200)

>>> my_turtle.left(90)

>>> my_turtle.forward(200)

>>> my_turle.left(90)

>>> my_turtle.left(90)

>>> my_turtle.forward(200)

>>> my_turtle.left(90)

>>> my_turtle.forward(200)

>>> my_turtle.left(90)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle = turtle.Turtle()

my_turtle.forward(60)

my_turtle.left(90)

my_turtle.forward(60)

my_turtle.left(90)

my_turtle.forward(60)

my_turtle.left(90)

my_turtle.forward(60)

my_turtle.right(45)

my_turtle.forward(30)

my_turtle.left(135)

my_turtle.forward(101)

my_turtle.left(135)

my_turtle.forward(30)

my_turtle.right(45)

my_turtle.forward(60)

my_turtle.right(45)

my_turtle.forward(30)

my_turtle.left(135)

my_turtle.forward(101)

my_turtle.left(135)

my_turtle.forward(30)

my_turtle.right(45)

my_turtle.forward(60)

my_turtle.right(135)

my_turtle.forward(50)

my_turtle.right(100)

my_turtle.forward(40)

my_turtle.right(79)

my_turtle.forward(83)

my_turtle.left(80)

my_turtle.forward(50)

my_turtle.left(108)

my_turtle.forward(48)

my_turtle.left(80)

my_turtle.forward(85)

import turtle

my_turtle = turtle.Turtle()

my_turtle.forward(110)

my_turtle.left(90)

my_turtle.forward(110)

my_turtle.left(90)

my_turtle.forward(162)

my_turtle.left(90)

my_turtle.forward(165)

my_turtle.left(90)

my_turtle.forward(162)

my_turtle.left(90)

my_turtle.forward(165)

>>> my_turtle = turtle.Turtle ()

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

m=turtle.Turtle()

for x in range(0,4):

m.forward(100)

m.left(90)

(x)

the code works fine on idle but at rep.it , i get this error

Traceback (most recent call last):

File "python", line 2, in

_tkinter.TclError: no display name and no $DISPLAY environment variable

my_turtle= turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

# Make a square with the turtle.

my_turtle=turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle=turtle.Turtle()

my_turtle.forward(50)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(50)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward (100)

my_turtle.left (90)

my_turtle.forward (100)

my_turtle.left (90)

my_turtle.forward (100)

my_turtle.left (90)

my_turtle.forward (100)

# Make a square with the turtle.

my_turtle = turtle.Turtle()

my_turtle.forward (100)

my_turtle.left (90)

my_turtle.forward (100)

my_turtle.left(90)

my_turtle.forward (100)

my_turtle.left (90)

my_turtle.forward (100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.right(90)

my_turtle.forward(100)

my_turtle.right(90)

my_turtle.forward(100)

my_turtle.right(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward (100)

my_turtle.left (90)

my_turtle.forward (100)

my_turtle.left (90)

my_turtle.forward (100)

my_turtle.left (90)

my_turtle.forward (100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle ()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

# Make a square with the turtle.

import turtle

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.right(90)

my_turtle.forward(100)

my_turtle.right(90)

my_turtle.forward(100)

my_turtle.right(90)

my_turtle.forward(100)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>>

sonam = turtle.Turtle()

sonam.forward (100)

sonam.left (90)

sonam.forward(100)

sonam.left (90)

sonam.forward (100)

sonam.left (90)

sonam.forward (100)

sonam.left (90)

sonam.forward (10)

sonam.left (90)

sonam.forward (90)

sonam.right (90)

sonam.forward (80)

sonam.right (90)

sonam.forward (80)

sonam.right (90)

sonam.forward (70)

sonam.right (90)

sonam.forward (70)

sonam.right (90)

sonam.forward (60)

sonam.right (90)

sonam.forward (60)

sonam.right (90)

sonam.forward (50)

sonam.right (90)

sonam.forward (50)

sonam.right (90)

sonam.forward (40)

sonam.right (90)

sonam.forward (40)

sonam.right (90)

sonam.forward (30)

sonam.right (90)

sonam.forward (30)

sonam.right(90)

sonam.forward (20)

sonam.right (90)

sonam.forward (20)

sonam.right (90)

sonam.forward (10)

sonam.right(90)

sonam.forward (10)

sonam.right(90)

sonam.forward (5)

sonam.right(90)

sonam.forward(5)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.right(180)

my_turtle.forward(100)

my_turtle.right(45)

my_turtle.forward(70)

my_turtle.right(90)

my_turtle.forward(70)

my_turtle.right(45)

my_turtle.forward(100)

my_turtle.right(90)

my_turtle.forward(100)

my_turtle.right(90)

my_turtle.forward(50)

my_turtle.right(90)

my_turtle.forward(10)

my_turtle.left(90)

my_turtle.forward(30)

my_turtle.left(180)

my_turtle.forward(60)

my_turtle.left(180)

my_turtle.forward(30)

my_turtle.right(90)

my_turtle.forward(20)

my_turtle.right(90)

my_turtle.forward(30)

my_turtle.right(180)

my_turtle.forward(60)

my_turtle.right(180)

my_turtle.forward(30)

my_turtle.left(90)

my_turtle.forward(10)

my_turtle.right(90)

my_turtle.forward(30)

my_turtle.left(90)

my_turtle.forward(20)

my_turtle.right(180)

my_turtle.forward(20)

my_turtle.right(90)

my_turtle.forward(60)

my_turtle.right(90)

my_turtle.forward(20)

my_turtle.right(180)

my_turtle.forward(20)

my_turtle.left(90)

my_turtle.forward(30)

my_turtle.left(90)

my_turtle.forward(40)

my_turtle.right(90)

my_turtle.forward(30)

my_turtle.right(180)

my_turtle.forward(30)

my_turtle.right(25)

my_turtle.forward(30)

my_turtle.right(180)

my_turtle.forward(30)

my_turtle.right(115)

my_turtle.forward(30)

my_turtle.right(180)

my_turtle.forward(30)

my_turtle.left(50)

my_turtle.forward(20)

my_turtle.right(180)

>>> my_turtle = turtle.Turtle()

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my turtle.left(90)

SyntaxError: invalid syntax

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

https://repl.it/languages/python3

t = turtle.Pen()

t.shape("turtle")

t.forward(100)

t.left(90)

t.forward(100)

t.left(90)

t.forward(100)

t.left(90)

t.forward(100)

What do I do? I ran it in Trinket on the page, not IDLE.

import turtle

my_turtle=turtle.Turtle()

my_turtle.forward(90)

my_turtle.left(90)

my_turtle.forward(90)

my_turtle.left(90)

my_turtle.left(45)

my_turtle.forward(127.28)

my_turtle.left(45)

my_turtle.left(45)

my_turtle.forward(127.28)

my_turtle.left(135)

my_turtle.forward(90)

my_turtle.right(90)

my_turtle.forward(90)

my_turtle.right(135)

my_turtle.forward(127.28)

my_turtle.right(135)

my_turtle.forward(180)

my_turtle.right(135)

my_turtle.forward(127.28)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

>>> import turtle

>>> my_turtle=turtle.Turtle()

>>> my_turtle.forward(120)

>>> my_turtle.right(90)

>>> my_turtle.forward(120)

>>> my_turtle.left(45)

>>> my_turtle.back(169.705627)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

>>> my_turtle.forward (100)

>>> my-turtle.left (90)

Traceback (most recent call last):

File "", line 1, in

my-turtle.left (90)

NameError: name 'my' is not defined

>>> my_turtle.left (90)

>>> my_turtle.forward (100)

>>> my_turtle.left (90)

>>> my_turtle.forward (100)

>>> my_turtle.left (90)

>>> my_turtle. forward (100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

turtle.done()

my_turtle = turtle. Turtle ()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

x = 0

while x t = Turtle()

tt = Turtle()

t.left(x)

t.forward(50)

tt.left(x)

tt.forward(50)

t.left(15)

t.forward(80)

t.right(30)

t.forward(80)

tt.right(15)

tt.forward(80)

tt.left(30)

tt.forward(80)

x += 30

x = 0

while x t = Turtle()

tt = Turtle()

t.right(x)

t.forward(50)

tt.right(x)

tt.forward(50)

t.left(15)

t.forward(80)

t.right(30)

t.forward(80)

tt.right(15)

tt.forward(80)

tt.left(30)

tt.forward(80)

x += 30

and yea, it's funny!

while x * t * = Turtle()

#nice and easy

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

# Make a square with the turtle.

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(50)

my_turtle.left(90)

my_turtle.forward(50)

my_turtle.left(90)

my_turtle.forward(50)

my_turtle.right(180)

my_turtle.forward(100)

my_turtle.left(180)

my_turtle.forward(50)

my_turtle.right(90)

my_turtle.forward(50)

my_turtle=turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

My_turtle=turtle.Turtle()

My_turtle.forward(150)

My_turtle.left(90)

My_turtle.forward(150)

My_turtle.left(90)

My_turtle.forward(150)

My_turtle.left(90)

My_turtle.forward(150)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

>>>

>>>

>>> my_turtle = turtle.turtle()

Traceback (most recent call last):

File "", line 1, in

my_turtle = turtle.turtle()

AttributeError: module 'turtle' has no attribute 'turtle'

>>> my_turtle = turtle.Turtle()

>>> my_turtle = forward(100)

Traceback (most recent call last):

File "", line 1, in

my_turtle = forward(100)

NameError: name 'forward' is not defined

>>> my_turtle.forwaed(100)

Traceback (most recent call last):

File "", line 1, in

my_turtle.forwaed(100)

AttributeError: 'Turtle' object has no attribute 'forwaed'

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

>>> my_turtle.left(90)

>>> my_turtle.forward(100)

import turtle

batman = turtle.Turtle()

batman.forward(100)

batman.left(90)

batman.forward(100)

batman.left(90)

batman.forward(100)

batman.left(90)

batman.forward(100)

batman.left(90)

# Make a square with the turtle.

import turtle

my_turtle = turtle.Turtle()

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle = turtle.turtle()

my_turtle.forward(100)

my-turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)

my_turtle.left(90)

my_turtle.forward(100)