-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdrawing_circle_pattern.infy.py
More file actions
29 lines (26 loc) · 1.05 KB
/
drawing_circle_pattern.infy.py
File metadata and controls
29 lines (26 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import turtle # allows us to use the turtles library
wn = turtle.Screen() # creates a graphics window
wn.setup(500,500) # set window dimension
alex = turtle.Turtle() # create a turtle named alex
alex.shape("turtle") # alex looks like a turtle
alex.color("green") # alex has a color
alex.right(60) # alex turns 60 degrees right
alex.left(60) # alex turns 60 degrees left
alex.circle(50) # draws a circle of radius 50
#draws circles
for counter in range(1,4):
alex.circle(20*counter)
alex.color("red") # alex has a color
# alex turns 60 degrees right
alex.left(120) # alex turns 60 degrees left
alex.circle(50) # draws a circle of radius 50
#draws circles
for counter in range(1,4):
alex.circle(20*counter)
alex.color("blue") # alex has a color
# alex turns 60 degrees right
alex.right(-120) # alex turns 60 degrees left
alex.circle(50) # draws a circle of radius 50
#draws circles
for counter in range(1,4):
alex.circle(20*counter)