93.9k views
5 votes
Does anybody have the code to 4.3.4 colorful caterpillar in codehs ?

User Ajmartin
by
8.2k points

1 Answer

1 vote

Answer:

"""

This code will draw 8 circles t fore a multi colored caterpillar

"""

penup()

backward(140)

#define the fuction

def draw_circle(color_choice):

begin_fill()

color(color_choice)

circle (20)

end_fill()

forward(40)

#for loop to draw 8 circles

for i in range (8):

color_choice=input("Enter color:") #ask the user what color per circle

draw_circle(color_choice) #calling the functionStep-by-step explanation:

User Leif John
by
7.8k points