Question: Please write this program on python 3 to draw a house. Thank you. part, you are going to use turtle graphics to define some elementary


Please write this program on python 3 to draw a house. Thank you.
part, you are going to use turtle graphics to define some elementary shapes that know how to draw themselves. You are going to create at least 3 classes. Using instances of these classes, you are going to draw a simple picture. Your Task 1. You will define at least three classes: A Triangle class, a Rectangle class, and a Circle class. 2. Instances of each class respond to at least the following methods: init create an instance of the class from the following a. i. For a Triangle: three pairs of coordinates, which indicate the three vertices (not a list, but three arguments, which you may give some default values for easy testing) ii. For a Rectangle: two pairs of coordinates one giving the coordinates of the lower left corner and the other giving the coordinates of the top right corner (not a list, but two arguments) iii. For a Circle a coordinate pair giving the center of the circle and a float giving the radius iv. For all, a string indicating a fill color (default value the empty string) v. For all, a string indicating the line color (default value "black") b. Str conversion to a string, returns the string to be used for printing in the Python shell c. draw: will take a turtle.Turtle object and will use it for drawing the shape, 3. All classes, methods and functions require a docstring for a general description of the object/method/function. (see docstring note below) 4. Triangle and Rectangle should both inherit from Polygon and reuse what they can from Polygon 5. Once you have tested your class definitions, draw a simple picture using them. For instance, you could draw a house using rectangles, triangles, circles and lines. The only requirement is that it should be made up of multiple shapes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
