Question: For this problem, you'll write a program to draw a simple picture of a house. It will look something like this: Figure 1: A sample

 For this problem, you'll write a program to draw a simplepicture of a house. It will look something like this: Figure 1:

For this problem, you'll write a program to draw a simple picture of a house. It will look something like this: Figure 1: A sample house with (r. g, b) values of (255, 255, 230) for the color of the house's wall. Getting the right visual output for this problem is pretty easy. Our real goal is to practice writing func- tion definitions and using function calls, arguments, and parameters correctly. For this reason, you are required to break up your program into the following functions: Getting the right visual output for this problem is pretty easy. Our real goal is to practice writing func- tion definitions and using function calls, arguments, and parameters correctly. For this reason, you are required to break up your program into the following functions: draw_frame (r, g, b) draws the wall of the house. The values r. g, and bare parameters to this func- tion. Use these parameters to set the color of the house's wall. draw_roof (r, g, b) draws the roof of the house, including the chimney. The values r, g, and b are parameters to this function. Use these parameters to set the color of the house's roof. The chimney may be any color of your choice. draw_window(x, y) draws one window of the house. The values x and y are parameters to this func- tion. Use these parameters to set the location coordinates of the window. The window may be any color of your choice. draw_door (x, y, r, g, b) draws the door of the house. A door consists of a rectangle as well as a circle for the door knob. The values x, y, r. g, and b are parameters to this function. Use these parameters to set the location and color of the house's door. draw_house (ri, gi, bi, r2, g2, b2) makes a function call to all four of the functions above, in order to draw all parts of the house. The values r1, g1, and bi are parameters to this function, repre- senting the house color. The values r2. g2, and b2 are parameters to this function, representing the door color. This function's parameters should be passed on as arguments to the other four functions. Each of the functions above must be documented with a docstring that describes what the function does and the meaning of its parameters. A small number of single-line comments should also be used where appropriate throughout the program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!