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

User Ajmartin
by
8.4k 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
8.1k points

Related questions

1 answer
0 votes
58.1k views
1 answer
2 votes
29.3k views
asked Jun 12, 2022 93.7k views
Zlata asked Jun 12, 2022
by Zlata
8.3k points
1 answer
4 votes
93.7k views