BbJLeB

05. Vacation

May 12th, 2019
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 KB | None | 0 0
  1. # 05. Vacation
  2. budget = float(input())
  3. season = input()
  4.  
  5. if budget <= 1000:
  6.     accommodation = "Camp"
  7.     if season == "Summer":
  8.         price = 65 / 100 * budget
  9.     elif season == "Winter":
  10.         price = 45 / 100 * budget
  11. elif 1000 < budget <= 3000:
  12.     accommodation = "Hut"
  13.     if season == "Summer":
  14.         price = 80 / 100 * budget
  15.     elif season == "Winter":
  16.         price = 60 / 100 * budget
  17. elif budget > 3000:
  18.     accommodation = "Hotel"
  19.     price = 90 / 100 * budget
  20.  
  21. if season == "Summer":
  22.     location = "Alaska"
  23. elif season == "Winter":
  24.     location = "Morocco"
  25.  
  26. print(f"{location} - {accommodation} - {price:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment