Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- budget = int(input())
- season = input()
- fisherman_count = int(input())
- boat_rent = None
- if season == "Spring":
- boat_rent = 3000
- if fisherman_count <= 6:
- boat_rent *= 0.9
- elif 7 <= fisherman_count <= 11:
- boat_rent *= 0.85
- elif fisherman_count >= 12:
- boat_rent *= 0.75
- elif season == "Summer" or season == "Autumn":
- boat_rent = 4200
- if fisherman_count <= 6:
- boat_rent *= 0.9
- elif 7 <= fisherman_count <= 11:
- boat_rent *= 0.85
- elif fisherman_count >= 12:
- boat_rent *= 0.75
- elif season == "Winter":
- boat_rent = 2600
- if fisherman_count <= 6:
- boat_rent *= 0.9
- elif 7 <= fisherman_count <= 11:
- boat_rent *= 0.85
- elif fisherman_count >= 12:
- boat_rent *= 0.75
- if fisherman_count % 2 == 0 and not season == "Autumn":
- boat_rent *= 0.95
- diff = abs (budget - boat_rent)
- if budget >= boat_rent:
- print(f"Yes! You have {diff:.2f} leva left.")
- elif budget < boat_rent:
- print(f"Not enough money! You need {diff:.2f} leva.")
Advertisement
Add Comment
Please, Sign In to add comment