Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. budget = int(input())
  2. season = input()
  3. fisherman_count = int(input())
  4.  
  5. price = 0
  6. discount = 0
  7.  
  8. if fisherman_count <= 6:
  9. discount = 0.10
  10. if season == "Spring":
  11. price == 3000 *0.9
  12. if (fisherman_count % 2) == 0:
  13. price = price*0.95
  14. else:
  15. price = price
  16.  
  17. elif season == "Summer" and season == "Autumn":
  18. discount = 0.10
  19. price = 4200 * 0.9
  20. if (fisherman_count) % 2 == 0 and season != "Autumn" :
  21. price = price*0.95
  22. else:
  23. price = price
  24. else:
  25. season == "Winter"
  26. discount = 0.10
  27. price == 2600 * 0.9
  28. if (fisherman_count % 2) == 0:
  29. price = price*0.95
  30. else:
  31. price = price
  32.  
  33.  
  34.  
  35. elif fisherman_count > 7 and fisherman_count <= 11 :
  36. if season == "Spring":
  37. discount = 0.15
  38. price = 3000*0.85
  39. if (fisherman_count % 2) == 0:
  40. price = price*0.95
  41. else:
  42. price = price
  43. elif season == "Summer" and season == "Autumn":
  44. discount = 0.15
  45. price = 4200 * 0.85
  46. if (fisherman_count % 2) == 0 and season != "Autumn" :
  47. price = price*0.95
  48. else:
  49. price = price
  50. else:
  51. discount = 0.15
  52. season == "Winter"
  53. price == 2600 * 0.85
  54. if (fisherman_count % 2) == 0:
  55. price = price*0.95
  56. else:
  57. price = price
  58.  
  59. else:
  60. discount = 0.25
  61. if season == "Spring":
  62. price = 3000*0.75
  63. if (fisherman_count % 2) == 0:
  64. price = price*0.95
  65. else:
  66. price = price
  67. elif season == "Summer" and season == "Autumn":
  68. discount = 0.25
  69. price = 4200 * 0.75
  70. if (fisherman_count % 2) == 0 and season != "Autumn" :
  71. price = price*0.95
  72. else:
  73. price = price
  74. else:
  75. season == "Winter"
  76. discount = 0.25
  77. price == 2600 * 0.75
  78. if (fisherman_count % 2) == 0:
  79. price = price*0.95
  80. else:
  81. price = price
  82.  
  83. if budget <= price:
  84. left_money = budget - price
  85. print(f"Yes! You have {left_money:.2f} leva left.")
  86. else:
  87. needed_money = price - budget
  88. print(f"Not enough money! You need {needed_money:.2f} leva.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement