Advertisement
Guest User

Computer Room

a guest
Feb 29th, 2020
103
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. number_of_hours = int(input())
  3. number_of_people = int(input())
  4. day_type = input()
  5.  
  6. current_price = 0
  7.  
  8. if month in ["march", "april", "may"]:
  9. if day_type == 'day':
  10. current_price = 10.50
  11. else:
  12. current_price = 8.40
  13.  
  14. elif month in ["june", "july", "august"]:
  15. if day_type == 'day':
  16. current_price = 12.60
  17. else:
  18. current_price = 10.20
  19.  
  20. if number_of_people >= 4:
  21. current_price = current_price - (current_price * 0.10)
  22.  
  23. if number_of_hours >= 5:
  24. current_price = current_price - (current_price * 0.50)
  25.  
  26. final_price = (current_price * number_of_people) * number_of_hours
  27. print(f'Price per person for one hour: {current_price:.2f}')
  28. print(f'Total cost of the visit: {final_price:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement