Advertisement
Ivaka_85

Untitled

Jan 25th, 2020
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.90 KB | None | 0 0
  1. needed_money = float(input())
  2. count_puzzle = int(input())
  3. count_dolls = int(input())
  4. count_teddy_bears = int(input())
  5. count_minions = int(input())
  6. count_trucks = int(input())
  7.  
  8. total_puzzle_price = count_puzzle * 2.60
  9. total_dolls_price = count_dolls * 3
  10. total_teddy_bears_price = count_teddy_bears * 4.10
  11. total_minions_price = count_minions * 8.20
  12. total_trucks_price = count_trucks * 2
  13. total_toys_price = total_puzzle_price + total_dolls_price + total_teddy_bears_price + total_minions_price \
  14.                    + total_trucks_price
  15. total_count_toys = count_puzzle + count_dolls + count_teddy_bears + count_minions + count_trucks
  16.  
  17. if total_count_toys >= 50:
  18.     total_toys_price *= 0.75
  19.  
  20. total_toys_price *= 0.9
  21.  
  22. if total_toys_price > needed_money:
  23.     print(f"Yes! {total_toys_price - needed_money:.2f} lv left.")
  24. else:
  25.     print(f"Not enough money! {needed_money - total_toys_price:.2f} lv needed. ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement