Guest User

Untitled

a guest
Mar 2nd, 2020
756
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. month = input()
  2. hours = int(input())
  3. people = int(input())
  4. day_night = input()
  5. price = 0
  6. total_cost = 0
  7.  
  8. if day_night == 'day' and month in ['march', 'april', 'may']:
  9. price = 10.5
  10. if people > 3:
  11. price *= 0.9
  12. if hours > 4:
  13. price *= 0.5
  14. elif day_night == 'day' and month in ['june', 'july', 'august']:
  15. price = 12.6
  16. if people > 3:
  17. price *= 0.9
  18. if hours > 4:
  19. price *= 0.5
  20. elif day_night == 'night' and month in ['march', 'april', 'may']:
  21. price = 8.4
  22. if people > 3:
  23. price *= 0.9
  24. if hours > 4:
  25. price *= 0.5
  26. elif day_night == 'night' and month in ['june', 'july', 'august']:
  27. price = 10.2
  28. if people > 3:
  29. price *= 0.9
  30. if hours > 4:
  31. price *= 0.5
  32.  
  33. total_cost = price * hours * people
  34.  
  35. print(f'Price per person for one hour: {price:.2f}')
  36. print(f'Total cost of the visit: {total_cost:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment