Advertisement
PowerCell46

Journey Python

Dec 16th, 2022
607
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.73 KB | None | 0 0
  1. budget = float(input())
  2. season = str(input())
  3. percentage = 0
  4. destination = ""
  5. place = ""
  6.  
  7. if budget <= 100:
  8.     destination = "Bulgaria"
  9.  
  10.     if season == "summer":
  11.         percentage = 30
  12.         place = "Camp"
  13.     elif season == "winter":
  14.         percentage = 70
  15.         place = "Hotel"
  16.  
  17. elif budget > 100 and budget <= 1000:
  18.     destination = "Balkans"
  19.  
  20.     if season == "summer":
  21.         percentage = 40
  22.         place = "Camp"
  23.     elif season == "winter":
  24.         percentage = 80
  25.         place = "Hotel"
  26.  
  27. elif budget > 1000:
  28.     destination = "Europe"
  29.     percentage = 90
  30.     place = "Hotel"
  31.  
  32. print(f'Somewhere in {destination}')
  33. spent_money = (budget / 100) * percentage
  34. print(f'{place} - {spent_money:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement