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