Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- puzzle = 2.60
- said_doll = 3
- plush_bear = 4.10
- minion = 8.20
- truck = 2
- money_to_trip = float(input())
- count_puzzle = int(input())
- count_said_doll = int(input())
- count_plush_bear = int(input())
- count_minions = int(input())
- count_truck = int(input())
- order_toys = count_puzzle + count_said_doll + count_plush_bear + count_minions + count_truck
- earned_money = count_puzzle * puzzle + count_said_doll * said_doll + count_plush_bear * plush_bear + \
- count_minions * minion + count_truck * truck
- if order_toys >= 50:
- earned_money *= 0.75
- earned_money = earned_money * 0.9
- money_defference = abs(earned_money - money_to_trip)
- if earned_money >= money_to_trip:
- print(f"Yes! {money_defference:.2f} lv left.")
- else:
- print(f"Not enough money! {money_defference:.2f} lv needed.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement