Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- price_trip = float(input())
- puzzles = int(input())
- dolls = int(input())
- bears = int(input())
- minios = int(input())
- trucks = int(input())
- number_toys = puzzles + dolls + bears + minios + trucks
- total_price = puzzles * 2.6 + dolls * 3 + bears * 4.10 + minios * 8.20 + trucks * 2
- from math import fabs
- if number_toys >= 50:
- ostatyk = total_price*0.75 * 0.90
- if ostatyk >= price_trip:
- print(f"Yes! {ostatyk-price_trip:.2f} lv left.")
- else:
- print(f"Not enough money! {fabs(ostatyk-price_trip):.2f} lv needed.")
- else:
- ostatyk = total_price * 0.90
- if ostatyk >= price_trip:
- print(f"Yes! {ostatyk-price_trip:.2f} lv left.")
- else:
- print(f"Not enough money! {fabs(ostatyk-price_trip):.2f} lv needed.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement