I have a function that draws a shape of different colors. My question is how would I pass a list of colors to draw this shape.
def drawCircle(color, radius):
turtle.color(color)
turtle.penup()
turtle.setpos(0, -radius)
xpos=turtle.xcor()
ypos=turtle.ycor()
head=turtle.heading()
turtle.begin_fill()
turtle.pendown()
turtle.home()
turtle.setpos(xpos,ypos)
turtle.setheading(head)
turtle.circle(radius)
turtle.home()
turtle.end_fill()
turtle.penup()
colorList = ["red", "green", "blue", "black"]
drawCircle(colorList, 100)
This function is supposed to go around a circle drawing arcs or the colors: