Advertisement
GeorgiLukanov87

fishingBoat100/100

Mar 11th, 2022
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 KB | None | 0 0
  1. Fishing Boat
  2. ================================================
  3.  
  4. budget = int(input())
  5. season = input()
  6. fishers = int(input())
  7. boat_price = None
  8.  
  9. if season == 'Spring':
  10.     boat_price = 3000
  11. elif season == 'Summer' or season == 'Autumn':
  12.     boat_price = 4200
  13. elif season == 'Winter':
  14.     boat_price = 2600
  15.  
  16. if fishers <= 6:
  17.     boat_price -= boat_price * 0.10
  18. elif fishers >= 7 and fishers <= 11:
  19.     boat_price -= boat_price * 0.15
  20. elif fishers > 11:
  21.     boat_price -= boat_price * 0.25
  22.  
  23. if season != "Autumn" and fishers % 2 == 0:
  24.     boat_price -= boat_price * 0.05
  25.  
  26. money = budget - boat_price
  27.  
  28. if money >= 0:
  29.     print(f"Yes! You have {money:.2f} leva left.")
  30. else:
  31.     print(f"Not enough money! You need {abs(money):.2f} leva.")
  32.  
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement