Advertisement
To0CrAzYy

Fishing Boat

Jan 23rd, 2022
757
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. budget = int(input())
  2. season = input()
  3. fishermen = int(input())
  4. boat_rent = 0
  5.  
  6. if season == "Spring":
  7.     boat_rent = 3000
  8. elif season == "Summer" or season == "Autumn":
  9.     boat_rent = 4200
  10. elif season == "Winter":
  11.     boat_rent = 2600
  12.  
  13. if fishermen <= 6:
  14.     boat_rent *= 0.9
  15. elif fishermen <= 11:
  16.     boat_rent *= 0.85
  17. else:
  18.     boat_rent *= 0.75
  19.  
  20. if season != "Autumn" and fishermen % 2 == 0:
  21.     boat_rent *= 0.95
  22. difference = abs(boat_rent - budget)
  23. if budget >= boat_rent:
  24.     print(f"Yes! You have {difference:.2f} leva left.")
  25. if budget <= boat_rent:
  26.     print(f"Not enough money! You need {difference:.2f} leva.")
  27.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement