Advertisement
Guest User

Journey Nested cond stat exercise

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