Advertisement
Staniss

Untitled

Jan 27th, 2020
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. budget = int(input())
  2. season = input()
  3. fisherman = int(input())
  4.  
  5. boat_price = 0
  6.  
  7. if season == "Spring":
  8. if fisherman <= 6:
  9. boat_price = 3000 * 0.1
  10. if fisherman % 2 == 0:
  11. boat_price *= 0.5
  12. elif 7 < fisherman < 11:
  13. boat_price = 3000 * 0.15
  14. if fisherman % 2 == 0:
  15. boat_price *= 0.5
  16. else:
  17. boat_price = 3000 * 0.25
  18. if fisherman % 2 == 0:
  19. boat_price *= 0.5
  20.  
  21.  
  22. if season == "Summer" and "Autumn":
  23. if fisherman <= 6:
  24. boat_price = 3000 * 0.1
  25. if season == "Summer" and fisherman % 2 == 0:
  26. boat_price *= 0.5
  27. elif 7 < fisherman < 11:
  28. boat_price = 3000 * 0.15
  29. if season == "Summer" and fisherman % 2 == 0:
  30. boat_price *= 0.5
  31. else:
  32. boat_price = 3000 * 0.25
  33. if season == "Summer" and fisherman % 2 == 0:
  34. boat_price *= 0.5
  35.  
  36. if season == "Winter":
  37. if fisherman <= 6:
  38. boat_price = 3000 * 0.1
  39. if fisherman % 2 == 0:
  40. boat_price *= 0.5
  41. elif 7 < fisherman < 11:
  42. boat_price = 3000 * 0.15
  43. if fisherman % 2 == 0:
  44. boat_price *= 0.5
  45. else:
  46. boat_price = 3000 * 0.25
  47. if fisherman % 2 == 0:
  48. boat_price *= 0.5
  49.  
  50. if budget > boat_price:
  51. print(f"Yes! You have {budget - boat_price:.2f} leva left.")
  52. else:
  53. print(f"Not enough money! You need {boat_price - budget:.2f} leva.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement