Advertisement
Spocoman

Movie Stars

Feb 17th, 2022
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. budget = float(input())
  2.  
  3. while budget >= 0:
  4.     actor = input()
  5.     if actor == "ACTION":
  6.         break
  7.  
  8.     if len(actor) <= 15:
  9.         salary = float(input())
  10.         budget -= salary
  11.     else:
  12.         budget *= 0.8
  13.  
  14. if budget < 0:
  15.     print(f"We need {abs(budget):.2f} leva for our actors.")
  16. else:
  17.     print(f"We are left with {budget:.2f} leva.")
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement