Hello, I am trying to create a code for the below
I am not getting the correct colors inside the circles. How do you alternate colors inside the lollipop circles? Below is my code:
import turtle
t=turtle.Turtle()
wn = turtle.Screen()
t.pensize(3)
t.speed(0)
t.penup()
t.pendown()
turtle.bgcolor(“black”)
t.pencolor(“white”)
list1 =[“red”,“orange”]
list2 =[“white”,“pink”]
list3 =[“blue”,“aqua”]
list4 =[“yellow”,“lime”]
list5 =[“purple”,“blue”]
list6 =[“tan”,“orange”]
radius= 75
def draw_circle_move_up():
t.pendown()
t.color(“red”, “orange”)
t.begin_fill()
t.circle(radius)
t.end_fill()
t.penup()
t.left(90)
t.fd(15)
t.right(90)
t.pendown()
t.penup()
t.setposition(-625,-50)
for i in range(5):
draw_circle_move_up()
radius = radius - 15
t.penup()
t.setposition(-632,-50)
t.pendown()
for i in range(2):
t.pencolor(“orange”)
t.fillcolor(“orange”)
t.begin_fill()
t.fd(14)
t.right(90)
t.fd(125)
t.right(90)
t.end_fill()
radius= 75
def draw_circle_move_up():
t.pendown()
t.color(“white”,“pink”)
t.begin_fill()
t.circle(radius)
t.end_fill()
t.circle(radius)
t.penup()
t.left(90)
t.fd(15)
t.right(90)
t.pendown()
t.penup()
t.setposition(-425,-50)
for i in range(5):
draw_circle_move_up()
radius = radius - 15
t.penup()
t.setposition(-432,-50)
t.pendown()
for i in range(2):
t.pencolor(“pink”)
t.fillcolor(“pink”)
t.begin_fill()
t.fd(14)
t.right(90)
t.fd(125)
t.right(90)
t.end_fill()
radius= 75
def draw_circle_move_up():
t.pendown()
t.color(“blue”,“aqua”)
t.begin_fill()
t.circle(radius)
t.end_fill()
t.circle(radius)
t.penup()
t.left(90)
t.fd(15)
t.right(90)
t.pendown()
t.penup()
t.setposition(-225,-50)
for i in range(5):
draw_circle_move_up()
radius = radius - 15
t.penup()
t.setposition(-232,-50)
t.pendown()
for i in range(2):
t.pencolor(“blue”)
t.fillcolor(“blue”)
t.begin_fill()
t.fd(14)
t.right(90)
t.fd(125)
t.right(90)
t.end_fill()
radius= 75
def draw_circle_move_up():
t.pendown()
t.color(“yellow”,“lime”)
t.begin_fill()
t.circle(radius)
t.end_fill()
t.circle(radius)
t.penup()
t.left(90)
t.fd(15)
t.right(90)
t.pendown()
t.penup()
t.setposition(-25,-50)
for i in range(5):
draw_circle_move_up()
radius = radius - 15
t.penup()
t.setposition(-32,-50)
t.pendown()
for i in range(2):
t.pencolor(“yellow”)
t.fillcolor(“yellow”)
t.begin_fill()
t.fd(14)
t.right(90)
t.fd(125)
t.right(90)
t.end_fill()
radius= 75
def draw_circle_move_up():
t.pendown()
t.color(“purple”,“red”)
t.begin_fill()
t.circle(radius)
t.end_fill()
t.circle(radius)
t.penup()
t.left(90)
t.fd(15)
t.right(90)
t.pendown()
t.penup()
t.setposition(175,-50)
for i in range(5):
draw_circle_move_up()
radius = radius - 15
t.penup()
t.setposition(168,-50)
t.pendown()
for i in range(2):
t.pencolor(“red”)
t.fillcolor(“red”)
t.begin_fill()
t.fd(14)
t.right(90)
t.fd(125)
t.right(90)
t.end_fill()
radius= 75
def draw_circle_move_up():
t.pendown()
t.color(“tan”,“dark green”)
t.begin_fill()
t.circle(radius)
t.end_fill()
t.circle(radius)
t.penup()
t.left(90)
t.fd(15)
t.right(90)
t.pendown()
t.penup()
t.setposition(375,-50)
for i in range(5):
draw_circle_move_up()
radius = radius - 15
t.penup()
t.setposition(368,-50)
t.pendown()
for i in range(2):
t.pencolor(“green”)
t.fillcolor(“green”)
t.begin_fill()
t.fd(14)
t.right(90)
t.fd(125)
t.right(90)
t.end_fill()
wn.exitonclick()