Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- budget = float(input())
- category = input()
- count_of_people = int(input())
- have_budget = True
- transport = 0
- available_money = 0
- if 1 <= count_of_people <= 4:
- transport = budget * 0.75
- elif 5 <= count_of_people <= 9:
- transport = budget * 0.60
- elif 10 <= count_of_people <= 24:
- transport = budget * 0.50
- elif 25 <= count_of_people <= 49:
- transport = budget * 0.40
- elif count_of_people >= 50:
- transport = budget * 0.25
- if category == "VIP":
- ticket_price = count_of_people * 499.99
- else:
- ticket_price = count_of_people * 249.99
- total_price = transport + ticket_price
- if budget >= total_price:
- money_left = budget - total_price
- print(f"Yes! You have {money_left:.2f} leva left.")
- else:
- needed_money = total_price - budget
- print(f"Not enough money! You need {needed_money:.2f} leva.")
Advertisement
Add Comment
Please, Sign In to add comment