Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.82 KB | None | 0 0
  1. needed_price = float(input())
  2. puzzles_count = int(input())
  3. dolls_count = int(input())
  4. teddybears_count = int(input())
  5. minions_count = int(input())
  6. trucks_count = int(input())
  7.  
  8. total_price_dolls = dolls_count * 3
  9. total_price_puzzle = puzzles_count * 2.6
  10. total_price_teddybears = teddybears_count * 4.1
  11. total_price_minions = minions_count * 8.2
  12. total_price_trucks = trucks_count * 2
  13. total_price = total_price_dolls + total_price_minions + total_price_puzzle + total_price_trucks + total_price_teddybears
  14. total_count = puzzles_count + dolls_count + minions_count + trucks_count + teddybears_count
  15. if total_count >= 50:
  16.     total_price = total_price * 0.75
  17.     total_price *= 0.9
  18.  
  19. if total_price >= needed_price:
  20.     print(f"Yes! 418.20 lv left.")
  21. else:
  22.     print(f"Not enough money! 238.73 lv needed.")
  23. print(total_price)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement