Advertisement
Guest User

Untitled

a guest
Jul 26th, 2020
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. import math
  2.  
  3. height = int(input())
  4. width = int(input())
  5. percentage_hall_not_for_painting = int(input()) / 100
  6. area_volume = height * width * 4
  7. area_volume_for_painting = area_volume - (area_volume * percentage_hall_not_for_painting)
  8. command = input()
  9.  
  10. while command != 'Tired!':
  11. liters_paint = int(command)
  12. area_volume_for_painting -= liters_paint
  13. if area_volume_for_painting <= 0:
  14. if area_volume_for_painting == 0 and liters_paint == 0:
  15. print("All walls are painted! Great job, Pesho!")
  16. elif area_volume_for_painting < 0 and liters_paint > 0:
  17. print(f"All walls are painted and you have {(abs (int(area_volume_for_painting)))} l paint left!")
  18. break
  19. command = input()
  20.  
  21. if command == 'Tired!' or liters_paint < 0:
  22. print(f"{math.ceil(area_volume_for_painting)} quadratic m left." )
  23.  
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement