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