Objects & Graphics

Your Assignment


Before you begin this assignment, become a little more acquainted with Python, objected-oriented programming and graphics through the Graphics tutorial.

Then, read about and download the graphics.py Python module which is necessary for this graphical assignment in Installing graphics.py.

Five-click house

You are to write a program that allows the user to draw a simple house using five mouse clicks.

  1. Click 1 and 2 will mark the opposite corners of the rectangular frame of the house.
  2. Click 3 will indicate the center of the top edge of a rectangular door. The door should have a total width that is \(\frac{1}{5}\) of the width of the house frame. The sides of the door should extend from the corners of the top all the way down to the bottom of the frame.
  3. Click 4 will indicate the center of a square window. The window is \(\frac{3}{4}\) as wide as the door.
  4. Click 5, the last click, will indicate the peak of the roof. The edges of the roof will extend from the point at the peak to the corners of the top edge of the house frame.

Submission Requirements

Your file is required to be named lab_objects_graphics.py.

Please read and follow the Submission Requirements to avoid point deductions specified below.


The following is the grading rubric for this lab to be used by the course graders. The lab is worth 100 points.

Note: There may be additional criteria for grading, this is just a summary of the major rubric items.

Grading Rubric
Type Description Point Loss (Max)
SyntaxError Exceptions A program that doesn’t even start due to syntax errors. -30
Docstrings Missing proper lab header (e.g. no name, lab section, etc) -10
main() Your program should have main() as the first-called function -10
PEP 8 Style Egregious problems with your code styling -10
Incorrect Filename Follow the submission instructions -5
Commenting Insufficient or excessive comments -5
  [Lab Specific]  
House Drawing The house isn’t drawn correctly -5/instance, max -30