Advertisement
desislava_topuzakova

Untitled

May 10th, 2020
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. month = input()
  2. number_of_nights = int(input())
  3. total_price = 0
  4. total_price1 = 0
  5. if month == "May" or month == "October":
  6. price_studio = 50
  7. apartment_price = 65
  8. if 7 < number_of_nights <= 14:
  9. price_studio = price_studio - 0.05 * price_studio
  10. elif number_of_nights > 14:
  11. apartment_price = apartment_price - 0.1 * apartment_price
  12. price_studio = price_studio - 0.3 * price_studio
  13. if month == "June" or month == "September":
  14. price_studio = 75.2
  15. apartment_price = 68.7
  16. if number_of_nights > 14:
  17. price_studio = price_studio - 0.2 * price_studio
  18. apartment_price = apartment_price - 0.1 * apartment_price
  19. if month == "July" or month == "August":
  20. price_studio = 76
  21. apartment_price = 77
  22. if number_of_nights > 14:
  23. apartment_price = apartment_price - 0.1 * apartment_price
  24.  
  25. total_price = number_of_nights * price_studio
  26. total_price1 = number_of_nights * apartment_price
  27.  
  28. print(f"Apartment: {total_price1:.2f} lv.")
  29. print(f"Studio: {total_price:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement