1.1-Introductie-Programmeren

A scalable house

Difficulty: Filled Filled Filled

Write a program that can draw a scalable house. You’ll need to provide the coordinates of the bottom-left corner, so you know where to start drawing. You should also be able to specify a width and height of the house, that will be used to stretch the base (the rectangle) of the house.

The roof will always be constructed in the same way: the middle of the roof will be in the center of the house (width / 2) and the height of the roof will always be at (height / 2).

Hint: Try drawing this house on paper first. Preferably a paper containing a grid.

Example

Example

Example