exDotaPro

15_june_2019_3_movie_destination

Jan 21st, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.77 KB | None | 0 0
  1. budget = float(input())
  2. destination = input()
  3. season = input()
  4. days = int(input())
  5.  
  6. price = 0
  7.  
  8. if destination == 'Dubai':
  9.     if season == 'Winter':
  10.         price = 45000
  11.     elif season == 'Summer':
  12.         price = 40000
  13.  
  14.     price *= 0.70
  15.  
  16. elif destination == 'Sofia':
  17.     if season == 'Winter':
  18.         price = 17000
  19.     elif season == 'Summer':
  20.         price = 12500
  21.  
  22.     price *= 1.25
  23.  
  24. elif destination == 'London':
  25.     if season == 'Winter':
  26.         price = 24000
  27.     elif season == 'Summer':
  28.         price = 20250
  29.  
  30. total_price = price * days
  31. diff = abs(budget - total_price)
  32.  
  33. if budget >= total_price:
  34.     print(f'The budget for the movie is enough! We have {diff:.2f} leva left!')
  35. else:
  36.     print(f'The director needs {diff:.2f} leva more!')
Add Comment
Please, Sign In to add comment