Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- budget = int(input())
- season = input()
- people = int(input())
- boat_price = 0
- money_left = 0
- if season == 'Spring':
- boat_price = 3000
- elif season == 'Summer' or season == 'Autumn':
- boat_price = 4200
- elif season == 'Winter':
- boat_price = 2600
- if people <= 6:
- boat_price -= boat_price * 0.10
- elif 6 < people <= 11:
- boat_price -= boat_price * 0.15
- elif people > 11:
- boat_price -= boat_price * 0.25
- if people % 2 == 0 and season != "Autumn":
- boat_price -= boat_price * 0.05
- if budget < boat_price:
- money_left = boat_price - budget
- print(f'Not enough money! You need {money_left:.2f} leva.')
- else:
- money_left = budget - boat_price
- print(f'Yes! You have {money_left:.2f} leva left.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement