-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcondition.py
More file actions
32 lines (31 loc) · 798 Bytes
/
Copy pathcondition.py
File metadata and controls
32 lines (31 loc) · 798 Bytes
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
30
31
32
import turtle
shape = input("What shape do you want?: (square/triangle/circle) ")
if shape == "square":
print("Making a square")
pen = turtle.Turtle()
screen = turtle.Screen()
pen.color("black")
for i in range(4):
pen.forward(100)
pen.left(90)
pen.hideturtle()
elif shape == "triangle":
print("Making a triangle")
pen = turtle.Turtle()
screen = turtle.Screen()
pen.color("black")
for i in range(3):
pen.forward(100)
pen.left(120)
pen.hideturtle()
elif shape == "circle":
print("Making a circle")
pen = turtle.Turtle()
screen = turtle.Screen()
pen.color("black")
for i in range(36):
pen.forward(15)
pen.left(10)
pen.hideturtle()
else:
print("Invalid shape given: " + shape + " (square/triangle/circle)")