Question: python In this problem you will be creating a Caterpillar class that will draw a caterpillar using turtle graphics. Your caterpillar object will contain the
python

In this problem you will be creating a Caterpillar class that will draw a caterpillar using turtle graphics. Your caterpillar object will contain the following information: I. Body color (default "green") 2. Legs color (default = "purple") 3. Body size (the radius of the 5 circles that make the caterpillars body) (default 50) You are going to want to create a turtle object that you will use to draw the caterpillar in the constructor, but it is not a parameter required to create a caterpillar. Your Caterpillar class mus include a display function that will be where your caterpillar is called (display can call helper functions if you choose to split up the different parts you need to draw). Here is a sample caterpillar with all of the defaults (this picture is smaller than what it would look like in the tur window) Constraints You must create a Caterpillar class (named Caterpillar) and include a display function (named display) to draw the caterpillar . Your display function should call 3 helper function (these will be extremely helpful in problem D) o draw_body0 this function should draw the body of the Caterpillar (the green overlapping circles) draw_antennae0 this function should draw the antennae on the Caterpillars head n draw_legs0 this function should draw the legs! You may only import turtle graphics (import turtle) You must use turtle.speed (0) in the display function or in the Caterpillar constructor before you draw the Caterpillar In this problem you will be creating a Caterpillar class that will draw a caterpillar using turtle graphics. Your caterpillar object will contain the following information: I. Body color (default "green") 2. Legs color (default = "purple") 3. Body size (the radius of the 5 circles that make the caterpillars body) (default 50) You are going to want to create a turtle object that you will use to draw the caterpillar in the constructor, but it is not a parameter required to create a caterpillar. Your Caterpillar class mus include a display function that will be where your caterpillar is called (display can call helper functions if you choose to split up the different parts you need to draw). Here is a sample caterpillar with all of the defaults (this picture is smaller than what it would look like in the tur window) Constraints You must create a Caterpillar class (named Caterpillar) and include a display function (named display) to draw the caterpillar . Your display function should call 3 helper function (these will be extremely helpful in problem D) o draw_body0 this function should draw the body of the Caterpillar (the green overlapping circles) draw_antennae0 this function should draw the antennae on the Caterpillars head n draw_legs0 this function should draw the legs! You may only import turtle graphics (import turtle) You must use turtle.speed (0) in the display function or in the Caterpillar constructor before you draw the Caterpillar
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
