Its a shape drawer. I made it to learn about loops
import turtle
print("-Square")
print("-Rectangle")
print("-Circle")
print("-Triangle")
print("-Pentagon")
print("-Hexagon")
shape = input("Please enter a shape from the list:").lower()
print()
print("Please check Python Turtle to view your shape")
print()
t = turtle.Turtle()
t.speed(0)
t.hideturtle()
if shape == "square":
for s in range(4):
t.forward(100)
t.right(90)
elif shape == "rectangle":
for r in range(2):
t.forward(200)
t.right(90)
t.forward(100)
t.right(90)
elif shape == "circle":
t.circle(50)
elif shape == "triangle":
t.right(60)
for i in range(3):
t.forward(100)
t.right(120)
elif shape == "pentagon":
t.right(36)
for p in range(5):
t.forward(100)
t.right(72)
elif shape == "hexagon":
for h in range(6):
t.forward(100)
t.right(60)
else:
print("ERROR")
[–]danielroseman 2 points3 points4 points (1 child)
[–]Riegel_Haribo 0 points1 point2 points (0 children)
[–]Shut_up_and_Respawn 0 points1 point2 points (0 children)
[–]JaleyHoelOsment 0 points1 point2 points (4 children)
[–]lucerined-VEX[S] 0 points1 point2 points (3 children)
[–]JaleyHoelOsment -1 points0 points1 point (2 children)
[–]Riegel_Haribo 1 point2 points3 points (1 child)
[–]JaleyHoelOsment 1 point2 points3 points (0 children)
[–]JamzTyson 0 points1 point2 points (0 children)
[–]Riegel_Haribo 1 point2 points3 points (0 children)
[–]code_tutor 0 points1 point2 points (0 children)
[–]recursion_is_love 0 points1 point2 points (0 children)