Advertisement
babavyna

Untitled

Apr 27th, 2020
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. excursionPrice = float(input())
  2. puzzles = int(input())
  3. talkingDolls = int(input())
  4. bears = int(input())
  5. minions = int(input())
  6. trucks = int(input())
  7. finalProfit = 0
  8.  
  9. totalPuzzles = puzzles * 2.60
  10. totalTalkingDolls = talkingDolls * 3
  11. totalBears = bears * 4.10
  12. totalMinions = minions * 8.20
  13. totalTrucks = trucks * 2
  14.  
  15. totalOrder = puzzles + talkingDolls + bears + minions + trucks
  16. totalSale = totalPuzzles + totalTalkingDolls + totalBears + totalMinions + totalTrucks
  17.  
  18. if totalOrder >= 50:
  19. discount = totalSale - (totalSale*0.25)
  20. rent = discount*0.1
  21. finalProfit = discount - rent
  22.  
  23. if finalProfit >= excursionPrice:
  24. sumLeft = finalProfit - excursionPrice
  25. print(f'Yes! {sumLeft:.2f} lv left.')
  26. else:
  27. rent = totalSale*0.1
  28. neededAmount = excursionPrice - (totalSale - rent)
  29. print(f'Not enough money! {neededAmount:.2f} lv needed.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement