Previous Lecture Complete and continue  

  Lesson 2: The Turtle

165 comments
kyra moss
https://repl.it/FPJ0/0
Kevin Moreno
import turtle


# 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)
joseph mesa
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)
christopher Winters
>>> 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)
Traceback (most recent call last):
File "", line 1, in
my.turtle.forward(100)
NameError: name 'my' is not defined
>>> my_turtle.forward(100)
Stanislav
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)
Richard
Okay I think I get it now.

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)
Jared
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)
Marc Ezekiel L Sibal
Hi
just wanted to ask how do you open the python graphics thing???? at 2:02
Ömer Turan
just click (run)
naisargi patel
import turtle
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)
Doua Moua
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)
fahad alotaibi

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

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

So satisfying :)
Vaidehi Bhadkamkar
https://repl.it/FLBg/0
Ali Darwish
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.left (90+45)
my_turtle.forward (100)
Karlo Turk
This is actually easy we had something like that in school, which basically used xy and stuff like that, really fun, but already learnt that xd
Peter Vo
import turtle
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)
hilmir straumland
import turtle


# 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)
Heer Patel
>>> 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_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)
>>>
Juan Carlos
there is a typing mistake in turtle
you mistakenly typed :turle in the last step..
that would be it..
Nacho Montero
import turtle
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)
kyle Lawson
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)
joubert frederic
>>> my_turtle.backward(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.
Simon Yeates
>>> import turtle
>>>
>>> turtle.forward(100)
>>> turtle.right(90)
>>> turtle.forward(100)
>>> turtle.right(90)
>>> turtle.forward(100)
>>> turtle.right(90)
>>> turtle.forward(100)
>>>
Glenn Synnes Skjong
import turtle


# 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)
Kundan Goyal
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)
>>>
David Valle
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.left(90)
ajay
# Make a square with the turtle.
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)
Young K Hwang
https://repl.it/FIX1/0

PaRuSch
https://repl.it/FH0k/0

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.
Munuhe
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)
Samir Khamis
>>> import turtle
>>>
>>>
>>>
>>> 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)
>>>
Alexander Escamila
>>>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)
changminlee
>>> 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)
Amruta Palo

Link
https://trinket.io/python/5f6a74dca4
Jaypee Genobe
https://repl.it/FGW0/3
Craig
>>> myturtle = turtle.Turtle()
>>> myturtle.forward(100)
>>> myturtle.left(90)
>>> myturtle.forward(100)
>>> myturtle.left(90)
>>> myturtle.forward(100)
>>> myturtle.left(90)
>>> myturtle.forward(100)
Eric Tang
import turtle


# 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)
shaz maknojia
import turtle
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)
Oscar van Vugt
import turtle

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()
David Lu
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)
Magnus Bach Andersen
import turtle


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.
Rafeh Qazi
Haha, hopefully your OCD has been satisfied. Wait this is not right! You used
Snake
. You should NOT be using
turtle.forward
you should be doing
Snake.forward
!
Andrej Radojcic
When i try this:
" 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
Magnus Bach Andersen
ahh ofc my bad xD
ty tho might've saved me from a lot of trouble in the future
Rafeh Qazi
I got you Magnus!
Adnan Hadzigrahic
>>> import turtle
>>> 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)
>>>
Adnan Hadzigrahic
>>> import turtle
>>> 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)
>>>
Andrej Radojcic
I have one question: How did you skip all those lines at 2:25? I want to try to make square but i dont want to exit python idle and start up it again. I hope you will respond to me :D
Andrija
import turtle
Ubica=turtle.Turtle()
Ubica.forward(100)
Ubica.left(90)
Ubica.forward(100)
Ubica.left(90)
Ubica.forward(100)
Ubica.left(90)
Ubica.forward(100)
Mohammed Ameerunnisa
import turtle
ameer=turtle.Turtle()
ameer.forward(100)
ameer.left(90)
ameer.forward(100)
ameer.left(90)
ameer.forward(100)
ameer.left(90)
ameer.forward(100)
Juan Esteban García
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)
Kashish Goyal
import turtle


# 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)
shane
made an error when i do so how do i go back to fix it it wont letme using python27,1..
>>> 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)
>>>
Teron Chapman
#The Import Command makes coding easier... Try it here.
#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)
James Daniel Smith
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)
Kirollas Megalaa
>>> my_turtle.forward(120)
>>> my_turtle.left(90)
>>> my_turtle.forward(120)
>>> my_turtle.left(90)
>>> my_turtle.forward(120)
>>> my_turtle.left(90)
>>> my_turtle.forward(120)
Ashutosh Shukla
import turtle


# 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)
L0rdyF
import turtle


# 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)
Ali
import turtle
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)
Roshan Ali
import turtle


# 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)
Fortune
import turtle
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)
Nathan Swedlund
you're the only person that I've seen on here to use forward(200) instead of (100) way to be different haha
Nathan Swedlund
it isn't a square but I DON'T PLAY BY YOUR RULES haha jk


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.
Isaac Janing
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 square
Ian Wixom
I know that this isn't a square, but I was messing around with repeat functions.

import turtle

my_turtle = turtle.Turtle()

moving = 1
while moving my_turtle.forward(200)
my_turtle.left(89)
moving = moving + 1
Chadi Idrissi Jazouli
import turtle
>>> 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
Aparna Saha
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)
Gianlucca
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)
Jeremia Leonard Abdining Gusti
import turtle
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)
Bevan zaveri
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)
Bendrik Bendriksson
Did it in the "story mode". I'm so new to this :D

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)
waleyeldeenahmed
why do you leave some spaces between the codes
Jorge Cruz
https://repl.it/EwW4/1

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?
Balan Elena
https://repl.it/FArw/0
tarun thakur
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)
Erika
>> 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)
>>>
Tony Gonzalez
import turtle
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)
Nathan Stork
import turtle

turtle = turtle.Turtle()
def square():
for i in range(0, 4):
turtle.forward(100)
turtle.right(90)

square()
Corstiaan Roon
import turtle
>>> 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)
Tabinda
>>> 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)
Amal Abdiweli
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)
Yannis Van Herp
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)
Gari Alfaro
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)
Jonas Abarham
https://trinket.io/python/83bc1445c0?runMode=console
Phuc Le
https://repl.it/EzJ6/0
ashish dagar
import turtle
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
Petar Hristov
https://www.repl.it/Eyw9/0
Ereatara Kokiri
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)
Ereatara Kokiri
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)
Anas Hamidov
I have one question!
How I can fined Python Turtle Graphics ?
I'm using windows 10 and python 3.6 !
Wonhyeong
import turtle
dj = turtle.Turtle()
dj.forward(100)
dj.left(90)
for x in range(0,3):
dj.forward(100)
dj.left(90)
x+=1
brandonshilling
import turtle


# 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()
Wong Xien Hean
https://repl.it/Eyi2/0
Kathy Nguyen
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)
Elmer Heino
import turtle


# 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)
Smile SunShine
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)
>>>
Quang Anh Tran
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.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)
Trevor Winger
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)
Justas Norinkevicius
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)
Groove Mysta
import turtle

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)
Abdulsalam Ajayi
Hampus
>>> my_turtle = turtle.Turtle()
>>> 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)
David Gielen
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)
Alice Boter
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.left(90)
Imran Hossain
import turtle


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)
manuel perrotta
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)
Mohammed Alfathali
import turtle
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
gagan parkiti
https://repl.it/EwbS/0
Tamilisetti Chakradhar
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)
ajinkya kamdi
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)
Ahmed H Bal
import turtle


# 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)
Federico Nardini
import turtle

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)
Diwaker Thakur
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
Vikramjit singh
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)
Anthony Davis
https://repl.it/EvOS/0

Nathan Downey
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)
# Make a square with the turtle.
Marc Rommel F, Briones
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)
Joren aerts
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)
Nahian Eshan
https://repl.it/EuVR/0
AdrianG03
https://repl.it/EuNq/1
Imran Anees
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)
Filipe Pinto
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)
Berkay Tekin
https://repl.it/EuCk/0 i wanted to have a triangle instead. yey!
Sasa Antal
Hey i got a problem. it says AttributeError: 'Turtle' object has no attribute 'letf' on line 8 in main.py ? What i did wrong ?
patrick mich
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)
Nishan Kumar Ghosh
https://repl.it/Et76/0
Arya Maulana
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)
Xerxes
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)
lucca bica
import turtle


# 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)
Seyma Sean
https://repl.it/EtF6/0
David Zambrano
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)
>>>
sonam chophel
import turtle
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)
t_lou
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)
william ford
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)
Jason Waldron
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.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)
Daniel Marin
>>> 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)
SyntaxError: invalid syntax
>>> my_turtle.left(90)
>>> my_turtle.forward(100)


https://repl.it/languages/python3
Samuel White
Finally got it working!!! Had to use Visual Studio! import turtle

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)
Samuel White
It says import turtle AttributeError: 'Turtle' object has no attribute 'foward' on line 5 in main.py
What do I do? I ran it in Trinket on the page, not IDLE.

Md Abdullah Al Maruf
I has little bit doubt about the axis.but now may be its maximum clear :)here i done some simple math...........btw...tnk u so much #Quzi_bro

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)
Niklas Lauren
import turtle
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)
Abel hristodor
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)
Md Abdullah Al Maruf
how is tht ? ;)
>>> 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)
prudhvi kandregula
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)
Michael
my_turtle = turtle.Turtle ()
>>> 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)
Jamie
https://repl.it/Elo7/0
Lucian
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.left(90)

turtle.done()









David
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)
Rafeh Qazi
https://repl.it/ElX6/0
mongi
from turtle import *

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!
Jason gomes
is that work? msg syntaxError: invalid syntax
while x * t * = Turtle()
Jason gomes
import 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)
Abboud Mahmi
from where did u get the python turtle graphics????
chesil shibu
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)
# Make a square with the turtle.
Elian Barajas
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.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)


Lucian
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)
Charles Lungu
import turtle
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)
Robert Spina
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)
Jacob Teramo
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)
Tharanga Mendis
import turtle
>>>
>>>
>>> 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)
Anidhito Irmandharu
i guess its
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.
Timotei Popa
I think:

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)
Rafeh Qazi
You should always run your code before hand in the console to make sure! But this looks good to me.
Michael Brenton
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)
Rafeh Qazi
Great work!