For Loops
This loop will draw a square without having to type out forward and left 4 times.
for i in range (4): forward(100) left(90)
num_sides = 7 # adding in extra detail like number of sidesfor i in range(num_sides): # this would run the loop 7 times t.forward(100) t.left(360/num_sides) # divide 360 by 7 to find the right angle
# for spiral shapes you can change out the forward value for i.for i in range (40): forward(i) # this makes the turtle go forward by i, # which would be 0 all the way to 40. left(90)
# making a five sized shapefor i in range (5): forward (100) left(360/5)