Advertisement
bl00dt3ars

04. Fishing Boat

Oct 28th, 2020
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. budget = int(input())
  2. season = input()
  3. fishers = int(input())
  4. boat = 0
  5.  
  6. if season == "Spring":
  7.     boat = 3000
  8. elif season == "Summer" or season == "Autumn":
  9.     boat = 4200
  10. else:
  11.     boat = 2600
  12.  
  13. if fishers <= 6:
  14.     boat *= 0.9
  15. elif 7 <= fishers <= 11:
  16.     boat *= 0.85
  17. else:
  18.     boat *= 0.75
  19.  
  20. if fishers % 2 == 0:
  21.     if season != "Autumn":
  22.         boat *= 0.95
  23.  
  24. if budget >= boat:
  25.     print(f"Yes! You have {budget - boat:.2f} leva left.")
  26. else:
  27.     print(f"Not enough money! You need {boat - budget:.2f} leva.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement