Advertisement
Guest User

Untitled

a guest
Oct 1st, 2019
465
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. month = input()
  2. nights = int(input())
  3. studio = 0
  4. apartment = 0
  5. total_studio = 0
  6. total_apartment = 0
  7. if month == "May":
  8. studio = 50
  9. apartment = 65
  10. elif month == "October":
  11. studio = 50
  12. apartment = 65
  13. elif month == "June":
  14. studio = 75.20
  15. apartment = 68.70
  16. elif month == "September":
  17. studio = 75.20
  18. apartment = 68.70
  19. elif month == "July":
  20. studio =76
  21. apartment =77
  22. elif month == "August":
  23. studio =76
  24. apartment =77
  25.  
  26. total_apartment = apartment * nights
  27. total_studio = studio * nights
  28.  
  29. if month == "May":
  30. if 7 > nights <= 14:
  31. total_studio = total_studio - (total_studio * 0.05)
  32. total_apartment = total_apartment
  33. elif nights >14:
  34. total_studio = total_studio - (total_studio * 0.30)
  35. total_apartment = total_apartment - (total_apartment * 0.10)
  36. elif month == "October":
  37. if 7 > nights <= 14:
  38. total_studio = total_studio - (total_studio * 0.05)
  39. total_apartment = total_apartment
  40. elif nights >14:
  41. total_studio = total_studio - (total_studio * 0.30)
  42. total_apartment = total_apartment - (total_apartment * 0.10)
  43. elif month == "June":
  44. if nights >14:
  45. total_studio = total_studio - (total_studio * 0.20)
  46. total_apartment = total_apartment - (total_apartment * 0.10)
  47. elif month == "September":
  48. if nights >14:
  49. total_studio = total_studio - (total_studio * 0.20)
  50. total_apartment = total_apartment - (total_apartment * 0.10)
  51. elif month == "July":
  52. if nights > 14:
  53. total_apartment = total_apartment - (total_apartment *.10)
  54. elif month == "August":
  55. if nights > 14:
  56. total_apartment = total_apartment - (total_apartment *.10)
  57. print(f'Apartment: {total_apartment:.2f} lv.')
  58. print(f'Studio: {total_studio:.2f} lv.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement