Advertisement
Guest User

hotel_room

a guest
Jun 22nd, 2022
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. month=input()
  2. number_of_nights=int(input())
  3. place=""
  4. price_per_night=0
  5. if month =="may" or month=="octomber":
  6. if place == "studio":
  7. price_per_night=50
  8. if number_of_nights>7:
  9. price_per_night *= 0.95
  10. elif number_of_nights>14:
  11. price_per_night *= 0.70
  12. elif place=="apartment":
  13. price_per_night=65
  14. if month=="june" or month=="september":
  15. if place == "studio":
  16. price_per_night=75.20
  17. if number_of_nights>14:
  18. price_per_night *= 0.80
  19. elif place=="apartment":
  20. price_per_night=68.70
  21. if month=="july" or month=="august" :
  22. if place == "studio":
  23. price_per_night=76
  24. elif place=="apartment":
  25. price_per_night=67
  26.  
  27. if place=="apartment":
  28. if number_of_nights>14:
  29. price_per_night*=0.90
  30.  
  31. total_price=number_of_nights*price_per_night
  32. print(f"Apartment: {total_price:.2f} lv.")
  33. print(f"Studio: {total_price:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement