Teo_Yanchev

Moviestars

Jul 7th, 2020
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. budget_actors = float(input())
  2.  
  3. budget_left =0
  4.  
  5. command = input()
  6. while command != "ACTION":
  7. command = len(command)
  8. if command <= 15:
  9. income = float(input())
  10. budget_actors -= income
  11. budget_left += income
  12. else:
  13. budget_actors -= budget_actors * 0.20
  14. budget_left = budget_actors
  15. if budget_actors < 0:
  16. diff = abs(budget_actors)
  17. print(f"We need {diff:.2f} leva for our actors.")
  18. break
  19.  
  20. command = input()
  21. if command == "ACTION":
  22. print(f"We are left with {budget_actors:.2f} leva.")
Add Comment
Please, Sign In to add comment