Teo_Yanchev

movie_destination

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