aneliabogeva

Movie Destination

Jun 15th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. import math
  2.  
  3. budget = float(input())
  4. destination = input()
  5. season = input()
  6. number_of_days = int(input())
  7. price = 0
  8. total_price = 0
  9.  
  10. if destination == "Dubai":
  11. if season == 'Winter':
  12. price = number_of_days * 45000
  13. total_price = price - (price * 0.3)
  14. else:
  15. price = number_of_days * 40000
  16. total_price = price - (price * 0.3)
  17. elif destination == "Sofia":
  18. if season == 'Winter':
  19. price = number_of_days * 17000
  20. total_price = price + (price * 0.25)
  21. else:
  22. price = number_of_days * 12500
  23. total_price = price + (price * 0.25)
  24. elif destination == "London":
  25. if season == 'Winter':
  26. total_price = number_of_days * 24000
  27. else:
  28. total_price = number_of_days * 20250
  29.  
  30. if total_price <= budget:
  31. print(f"The budget for the movie is enough! We have {abs(budget-total_price):.2f} leva left!")
  32. else:
  33. print(f"The director needs {abs(budget-total_price):.2f} leva more!")
Add Comment
Please, Sign In to add comment