Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- budget = float(input())
- category_ticket = input()
- count_people = int(input())
- money_transport = 0
- if 1 <= count_people <= 4:
- money_transport = budget * 0.75
- elif 5 <= count_people <= 9:
- money_transport = budget * 0.60
- elif 10 <= count_people <= 24:
- money_transport = budget * 0.50
- elif 25 <= count_people <= 49:
- money_transport = budget * 0.40
- elif count_people >= 50:
- money_transport = budget * 0.25
- left_money = budget - money_transport
- all_price_vip_ticket = 499.99 * count_people
- all_price_normal_ticket = 249.99 * count_people
- diff_vip = abs(left_money - all_price_vip_ticket)
- diff_normal = abs(left_money - all_price_normal_ticket)
- if diff_vip >= all_price_vip_ticket:
- print(f"Yes! You have {diff_vip:.2f} leva left.")
- else:
- print(f"Not enough money! You need {diff_vip:.2f} leva.")
- if diff_normal >= all_price_normal_ticket:
- print(f"Yes! You have {diff_normal:.2f} leva left.")
- else:
- print(f"Not enough money! You need {diff_normal:.2f} leva.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement