simeonshopov

Movie Destination (june exam)

Nov 6th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. budget = float(input())
  2. place = input()
  3. season = input()
  4. days = float(input())
  5.  
  6. expense = 0
  7.  
  8. if season == "Winter":
  9.   if place == "Dubai":
  10.     expense = days * 45000 * 0.7
  11.   elif place == "Sofia":
  12.     expense = days * 17000 * 1.25
  13.   elif place == "London":
  14.     expense = days * 24000
  15. elif season == "Summer":
  16.   if place == "Dubai":
  17.     expense = days * 40000 * 0.7
  18.   elif place == "Sofia":
  19.     expense = days * 12500 * 1.25
  20.   elif place == "London":
  21.     expense = days * 20250
  22. if expense <= budget:
  23.   print(f"The budget for the movie is enough! We have {(budget - expense):.2f} leva left!")
  24. else:
  25.   print(f"The director needs {(expense - budget):.2f} leva more!")
Add Comment
Please, Sign In to add comment