# Toy Shop [python]

Apr 12th, 2021
522
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. TrailPrice = float(input())
2. numPuzzles = float(input())
3. numTalkingDolls = float(input())
4. numBears = float(input())
5. numMinions = float(input())
6. numTrucks = float(input())
7. pNumTrucks = 2.00
8. pNumMinions = 8.20
9. pNumBears = 4.10
10. pNumPuzzles = 2.60
11. pNumTalkingDolls = 3.00
12. ALL = numTrucks + numBears + numPuzzles + numMinions + numTalkingDolls
13. allWithPrices = (numTrucks * pNumTrucks + numBears * pNumBears + numPuzzles * pNumPuzzles + numMinions * pNumMinions
14.                  + numTalkingDolls * pNumTalkingDolls) * 0.9
15. if ALL >= 50:
16.     allWithPrices *= 0.75
17. if allWithPrices >= TrailPrice:
18.     moneyLeft = allWithPrices - TrailPrice
19.     print("Yes! " + f'{moneyLeft:.2f}' + " lv left.")
20. else:
21.     moneyNeeded = TrailPrice - allWithPrices
22.     print(f"Not enough money! " + f'{moneyNeeded:.2f}' + " lv needed.")
23.
RAW Paste Data