Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2020
1,053
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.65 KB | None | 0 0
  1. month = input()
  2. hours = int(input())
  3. people = int(input())
  4. time = input()
  5. total = 0
  6. total2 = 0
  7.  
  8. if month == "march" or month == "april" or month == "may":
  9.     if time == "day":
  10.         total = hours * 10.5
  11.     elif time == "night":
  12.         total = hours * 8.4
  13.  
  14. elif month == "june" or month == "july" or month == "august":
  15.     if time == "day":
  16.         total = hours * 12.6
  17.     elif time == "night":
  18.         total = hours * 10.2
  19.  
  20. if people >= 4:
  21.     total *= 0.9
  22.  
  23. if hours >= 5:
  24.     total *= 0.5
  25.  
  26. total2 = total * people
  27.  
  28. print(f"Price per person for one hour: {(total / hours):.2f}")
  29. print(f"Total cost of the visit: {total2:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement