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
- if category_ticket == "VIP":
- price = count_people * 499.99
- else:
- price = count_people * 249.99
- left_money = budget - money_transport
- diff = abs(left_money - price)
- if left_money >= price:
- print(f"Yes! You have {diff:.2f} leva left.")
- else:
- print(f"Not enough money! You need {diff:.2f} leva.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement