Advertisement
bl00dt3ars

04. Movie Stars

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