I'm trying to create 3 equally smaller concentric shapes (triangles) and making each one a different color using a for loop (using turtle graphics). So far, I can make the shapes, but I am having extreme difficulty in filling them with different colors. The code below is what I have done so far. Can someone help with the coloring issue?
lengths = [300, 200, 100]
inner = ['red', 'dark blue', 'lime green']
for colouring in inner:
begin_fill()
fillcolor(colouring)
for tri_length in lengths:
penup()
right(90)
forward(tri_length * 0.57)
pendown()
left(150)
forward(tri_length)
left(120)
forward(tri_length)
left(120)
forward(tri_length)
penup()
home()
hideturtle()
done()