jumboframe

Untitled

Oct 9th, 2020
173
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. trip_price = float(input())
  2.  
  3. num_puzzles = int(input())
  4. num_dolls = int(input())
  5. num_bears = int(input())
  6. num_minions = int(input())
  7. num_trucks = int(input())
  8.  
  9. pr_puzzles = num_puzzles * 2.6
  10. pr_dolls = num_dolls * 3
  11. pr_bears = num_bears * 4.10
  12. pr_minions = num_minions * 8.20
  13. pr_trucks = num_trucks * 2
  14.  
  15. order_items = num_puzzles + num_dolls + num_bears + num_minions + num_trucks
  16.  
  17. if order_items >= 50:
  18. discount = 0.75
  19. else:
  20. discount = 1
  21.  
  22. subtotal = pr_puzzles + pr_dolls + pr_bears + pr_minions + pr_trucks
  23.  
  24. total = subtotal * discount
  25. total *= 0.9
  26.  
  27. income = total - trip_price
  28.  
  29. if income >= 0:
  30. print(f"Yes! {income:.2f} lv left.")
  31. else:
  32. income *= -1
  33. print(f"Not enough money! {income:.2f} lv needed.")
  34.  
RAW Paste Data