Advertisement
simeonshopov

Renovation 1.1

Oct 11th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. import math
  2.  
  3. height = int(input())
  4. length = int(input())
  5. percent = int(input())
  6. area_for_painting = height * length * 4
  7. area_for_painting = area_for_painting - area_for_painting * percent / 100
  8. area = math.ceil(area_for_painting)
  9. boq = input()
  10. while boq != "Tired!":
  11.   area -= int(boq)
  12.   if area <= 0:
  13.     break
  14.   boq = input()
  15.  
  16. if area == 0:
  17.   print("All walls are painted! Great job, Pesho!")
  18. elif area > 0:
  19.   print(f"{area} quadratic m left.")
  20. else:
  21.   print(f"All walls are painted and you have {area * -1} l paint left!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement