Question: Write a function house that takes three parameters: the width w of the house (a float), the height h of the house (a float),

Write a function house that takes three parameters: the width w of the house (a float), the height h of the 

Write a function house that takes three parameters: the width w of the house (a float), the height h of the house (a float), and the bottom left corner c of the house (a tuple of two floats). The corner is represented in turtle coordinates (so the origin (0,0) is the center of the screen). You may assume that c will be chosen to lie on the screen, and that the house will fit on the screen. You may interpret height as either the height to the bottom of the roof or to the top of the roof. The structure and style of the house is up to you, but, for full credit, it must contain the following elements, each of which will be drawn using a helper function, called from the main house function: - a roof - windows (at least 4) - a front door - a chimney - a lawn in front of the house - a path to the front door - a sun or moon in the sky If you are so inspired, feel free to add other elements. The parameters of these functions are up to you. Each element (door, window, sun, ...) must be a different colour. The background colour of the house walls must be a different colour than the elements. (Each window can be the same colour as the other windows.) You may choose the parameters you pass to each function that draws an element. You must use turtle graphics, so you must use the turtle module. If you wish, you may use any other module that we have covered in class (random, math, numpy).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Creating a function to draw a house with the specified elements using the Turtle graphics library is ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!