Advertisement
dkyoseff

Conditional Statements Advanced - Exercise / 05. Journey

Jul 27th, 2022
1,087
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.69 KB | None | 0 0
  1. budget = float(input())
  2. season = input()
  3.  
  4. destination = ""
  5. place = ""
  6. expences = 0
  7.  
  8. if budget <= 100:
  9.     destination = "Bulgaria"
  10.     if season == "summer":
  11.         place = "Camp"
  12.         expences = budget * 0.3
  13.     elif season == "winter":
  14.         place = "Hotel"
  15.         expences = budget * 0.7
  16.  
  17. elif budget <= 1000:
  18.     destination = "Balkans"
  19.     if season == "summer":
  20.         place = "Camp"
  21.         expences = budget * 0.4
  22.     elif season == "winter":
  23.         place = "Hotel"
  24.         expences = budget * 0.8
  25.        
  26. else:
  27.     destination = "Europe"
  28.     place = "Hotel"
  29.     expences = budget * 0.9
  30.  
  31. print(f'Somewhere in {destination}')
  32. print(f'{place} - {expences:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement