Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. month = input()
  2. nights_stay = int(input())
  3.  
  4. if (month == 'May' or month == 'October'):
  5. studio = 50
  6. apartment = 65
  7. if 7 <= nights_stay > 14:
  8. final_apartment_price = apartment * nights_stay
  9. studio_price = studio - (studio * 0.05)
  10. final_studio_price = studio_price * nights_stay
  11. print(f'Apartment: {final_apartment_price:.2f} lv.')
  12. print(f'Studio: {studio_price:.2f} lv.')
  13. elif nights_stay >= 14:
  14. final_apartment_price = apartment * nights_stay
  15. studio_price = studio - (studio * 0.3)
  16. final_studio_price = studio_price * nights_stay
  17. print(f'Apartment: {final_apartment_price:.2f} lv.')
  18. print(f'Studio: {final_studio_price:.2f} lv.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement