Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- guest = int(input())
- envelope = float(input())
- budget = float(input())
- total_sum = guest * envelope
- if 10 <= guest <= 15:
- total_sum *= 0.85
- elif 15 < guest <= 20:
- total_sum *= 0.8
- elif guest > 20:
- total_sum *= 0.75
- total_sum += budget / 10
- if budget >= total_sum:
- print(f"It is party time! {budget - total_sum:.2f} leva left.")
- else:
- print(f"No party! {total_sum - budget:.2f} leva needed.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement