Advertisement
D1mitroV

Toy Shop

Apr 11th, 2021
480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.95 KB | None | 0 0
  1. import math
  2. TrailPrice = float(input())
  3. numPuzzles = float(input())
  4. numTalkingDolls = float(input())
  5. numBears = float(input())
  6. numMinions = float(input())
  7. numTrucks = float(input())
  8. pNumTrucks = 2.00
  9. pNumMinions = 8.20
  10. pNumBears = 4.10
  11. pNumPuzzles = 2.60
  12. pNumTalkingDolls = 3.00
  13. ALL = numTrucks + numBears + numPuzzles + numMinions + numTalkingDolls
  14. allWithPrices = numTrucks * pNumTrucks + numBears * pNumBears + numPuzzles * pNumPuzzles + numMinions * pNumMinions + numTalkingDolls * pNumTalkingDolls
  15. if ALL >= 50:
  16.     summ = allWithPrices * 0.25
  17.     endsum = allWithPrices - summ
  18.     sumOut = endsum * 0.10
  19.     Profit = endsum - sumOut
  20.     left = Profit - TrailPrice
  21.     if Profit >= TrailPrice:
  22.         print("Yes! " + str("%.2f" % left) + " lv left.")
  23. if ALL < 50:
  24.     rent = allWithPrices * 0.10
  25.     left = allWithPrices - rent
  26.     needed = TrailPrice - left
  27.     print("Not enough money! " + str("%.2f" % needed) + " lv needed.")
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement