Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- budget_vac = int(input())
- season = input()
- N_fisherman = int(input())
- boat_price = 0
- # 2. Check season data and define boat price
- if season == "Spring":
- boat_price = 3000
- elif season == "Summer" or season == "Autumn":
- boat_price = 4200
- # elif season in ['Summer', 'Autumn']
- elif season =="Winter":
- boat_price = 2600
- discount = 0
- if N_fisherman<=6:
- discount=0.1
- elif 7<= N_fisherman<=11:
- discount = 0.15
- else:
- discount =0.25
- discount_value = boat_price*discount
- expenses = boat_price - discount_value
- if N_fisherman % 2 == 0 and season != "Autumn":
- expenses = expenses- expenses*0.05
- if budget_vac>=expenses:
- print(f"Yes! You have {(budget_vac-expenses):.2f} leva left.")
- else:
- print(f"Not enough money! You need {(expenses-budget_vac):.2f} leva.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement