Skip to content

Latest commit

 

History

History
35 lines (20 loc) · 1.06 KB

lab11-wall_painting.md

File metadata and controls

35 lines (20 loc) · 1.06 KB

*******************************************************

This syllabus is deprecated.

Intro to Programming has become Programming 101 and Programming 102.

Contact your instructor for the link to the correct syllabus.


*******************************************************

Lab 11: Wall Painting

Create a new file wall-painting.py.

All our friends are re-painting one wall of their rooms. They want us to figure out how much it's going to cost. Assume one gallon of paint covers 400 square feet.

Ask the user for:

  1. width of the wall
  2. height of the wall
  3. how much a gallon of paint costs

Figure out then print how much it will cost to paint the wall with one coat.

Advanced

  • Also ask the user for how many coats they're going to put on, and calculate that cost.

  • You can only buy whole gallons of paint. Figure out a way to round up so that you know how many whole gallons to buy.

  • Allow the user to enter multiple wall dimensions and it adds the total areas together before calculating the cost.