Advertisement
bl00dt3ars

03. Computer Room

Nov 14th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. month = input()
  2. hours = int(input())
  3. people = int(input())
  4. time = input()
  5.  
  6. if month == "march" or month == "april" or month == "may":
  7.     if time == "day":
  8.         price = 10.5
  9.     else:
  10.         price = 8.4
  11. else:
  12.     if time == "day":
  13.         price = 12.6
  14.     else:
  15.         price = 10.2
  16.  
  17. if people >= 4:
  18.     price *= 0.9
  19.  
  20. if hours >= 5:
  21.     price *= 0.5
  22.  
  23. print(f"Price per person for one hour: {price:.2f}")
  24. print(f"Total cost of the visit: {price * people * hours:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement