Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions TurtleTutorial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from turtle import *
#turtle is a drawing library

# To make a square we have to move forward then a direction 4 times.

for i in range(4): # Start a loop
forward(100) # Move forward
right(90) # Turn

# Now we just need to make a circle by a square
# To make it easy for us let us make a function to the square

def square():
for i in range(4):
forward(100)
right(90)
speed(0)
# return None

for i in range(360):
square()
right(1)
speed(0)

# And if you want to speed up stuff and get the result faster
# speed(10) # 0 is the fastest while 1 is the slowest, 10 is fast

# Have fun and try out different challenges