Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trip_price = float(input())
- puzzle = int(input())
- doll = int(input())
- bear = int(input())
- minion = int(input())
- truck = int(input())
- puzzle_price = puzzle * 2.60
- doll_price = doll * 3
- bear_price = bear * 4.10
- minion_price = minion * 8.2
- truck_price = truck * 2
- discount = 0
- total_count = (puzzle + doll + bear + minion + truck)
- total_price = (puzzle_price + doll_price + bear_price + minion_price + truck_price)
- if total_count >= 50:
- discount = total_price * 0.25
- else:
- discount = 0
- rent = (total_price - discount) * 0.1
- total_price = total_price - discount - rent
- money_need_left = abs(total_price - trip_price)
- if total_price >= trip_price:
- print(f'Yes! {money_need_left:.2f} lv left.')
- else:
- print(f'Not enough money! {money_need_left:.2f} lv needed.')
Advertisement
Add Comment
Please, Sign In to add comment