BbJLeB

Renovation

Apr 22nd, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. import math
  2.  
  3. budget = float(input())
  4. floor_width = float(input())
  5. floor_length = float(input())
  6. side_triangle = float(input())
  7. height_triangle = float(input())
  8. price_plate = float(input())
  9. craftsman_price = float(input())
  10.  
  11. floor = floor_length * floor_width
  12. triangle = (side_triangle*height_triangle)/2
  13. plate = math.ceil(floor / triangle)
  14. plate1 = plate + 5
  15. all_money = (plate1 * price_plate) + craftsman_price
  16. money = budget - all_money
  17. money1 = abs(all_money - budget)
  18.  
  19. if all_money <= budget:
  20.     print(f"{money:.2f} lv left.")
  21. else:
  22.     print(f"You'll need {money1:.2f} lv more.")
Advertisement
Add Comment
Please, Sign In to add comment