Advertisement
minusX

Homework 31

May 1st, 2014
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. room = 0
  2. while (room<3):
  3.     length = float(input("Enter the length of the first room in feet: "))
  4.     width = float(input("Enter the width of the first room in feet: "))
  5.     length_yard = float(length/3)
  6.     width_yard = float(width/3)
  7.     room_area = float(length_yard*width_yard)
  8.     room=room+1
  9. print ("The area of the first room is %s square yards." % (room1_area))
  10. print ("The cost of carpeting the first room is $%5.2f." % (room1_area*8.95))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement