Guest User

Untitled

a guest
Nov 28th, 2020
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.69 KB | None | 0 0
  1. excursion_price = float(input())
  2. puzzles = int(input())
  3. talking_dolls = int(input())
  4. teddy_bears = int(input())
  5. minions= int(input())
  6. trucks = int(input())
  7.  
  8. ordered_items = puzzles + talking_dolls + teddy_bears + minions + trucks
  9. revenue = puzzles * 2.6 + talking_dolls * 3 + teddy_bears * 4.1 + minions * 8.2 + trucks * 2
  10.  
  11. if ordered_items >= 50:
  12.     discounted_revenue = revenue * 0.75
  13. else:
  14.     discounted_revenue = revenue
  15.  
  16. rent = discounted_revenue * 0.1
  17. total_money = discounted_revenue - rent
  18. if total_money > excursion_price:
  19.     print(f"Yes! {total_money - excursion_price:.2f} lv left.")
  20. else:
  21.     print(f"Not enough money! {excursion_price - total_money:.2f} lv needed.")
Advertisement
Add Comment
Please, Sign In to add comment