As the subject says. I’ve been trying to understand how to get the for loop to work with my code, but I can not for the life of me figure it out. I have spent the past 2 hrs trying to get it but I just can not understand it. Can anyone help me with this code to get the for loop to work?
import turtle
wn = turtle.Screen()
tower = turtle.Turtle()
tower.color(“blue”)
tower.pensize(10)
side1 = 90
side2 = 40
side3 = 50
side4 = 60
#Right side of shape
tower.forward(side3)
tower.left(side1)
tower.forward(side2)
tower.left(side1)
tower.forward(20)
tower.right(side1)
tower.forward(side3)
tower.left(side1)
tower.forward(30)
tower.right(side1)
tower.forward(side4)
#Top of shape
tower.left(side1)
tower.forward(side2)
#Left side of shape
tower.left(side1)
tower.forward(side4)
tower.right(side1)
tower.forward(30)
tower.left(side1)
tower.forward(side3)
tower.right(side1)
tower.forward(20)
tower.left(side1)
tower.forward(side2)
#Bottom of shape
tower.left(side1)
tower.forward(side1)
wn.exitonclick()