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