Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- price_trip = float(input())
- n_puzzels = int(input())
- n_dolls = int(input())
- n_bears = int(input())
- n_minions = int(input())
- n_trucks = int(input())
- n_toys = n_puzzels + n_dolls + n_bears + n_minions + n_trucks
- price_earned = n_puzzels * 2.60 + n_dolls * 3 + n_bears * 4.10 + n_minions * 8.20 + n_trucks * 2
- if n_toys >= 50:
- price_earned = price_earned - price_earned * 0.25
- price_earned = price_earned - price_earned * 0.10
- if price_earned >= price_trip:
- money_left = price_earned - price_trip
- print(f'Yes! {money_left:.2f} lv left.')
- else:
- money_needed = price_trip - price_earned
- print(f'Not enough money! {money_needed:.2f} lv needed.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement