Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- puzzle = 2.60
- talking_doll = 3
- teddy_bear = 4.10
- minion = 8.20
- truck = 2
- vacation_price = float(input())
- puzzle_quantity = int(input())
- talking_doll_quantity = int(input())
- teddy_bear_quantity = int(input())
- minion_quantity = int(input())
- truck_quantity = int(input())
- toys_quantity = puzzle_quantity + talking_doll_quantity + teddy_bear_quantity + minion_quantity + truck_quantity
- total_price = (
- puzzle * puzzle_quantity +
- talking_doll * talking_doll_quantity +
- teddy_bear * teddy_bear_quantity +
- minion * minion_quantity +
- truck * truck_quantity
- )
- if toys_quantity >= 50:
- total_price *= 0.75
- total_price -= total_price * 0.10
- if total_price >= vacation_price:
- print(f"Yes! {total_price - vacation_price:.2f} lv left.")
- else:
- print(f"Not enough money! {vacation_price - total_price:.2f} lv needed.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement