Skip to main content

Section 18.6 Program Implementation - 4

We are finally ready to add a roof! This version of the program has added a drawRoof, but the procedure is missing its body. Try writing the body of drawRoof.
Tips:
  • If you make the roof a 30, 120, 30 triangle, the two upper sides should be 173 long.
  • Make sure to use begin_fill and end_fill in your procedure. Without them, the triangle will not get filled in.
  • You don’t have to draw the bottom edge of the roof since there is already a line there.
Notice we have commented out the tests for the doors and windows. There is no need to run that code while you are working on the roof.

Checkpoint 18.6.1.

Implement the drawRoof procedure
You have attempted of activities on this page.