exDotaPro

15_june_2019_4_movie_stars

Jan 21st, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. budget = float(input())
  2.  
  3. command = input()
  4.  
  5. while command != 'ACTION':
  6.     actor_name = command
  7.  
  8.     if len(actor_name) > 15:
  9.         salary = budget * 0.20
  10.     else:
  11.         salary = float(input())
  12.  
  13.     budget -= salary
  14.  
  15.     if budget <= 0:
  16.         print(f'We need {abs(budget):.2f} leva for our actors.')
  17.         break
  18.  
  19.     command = input()
  20.  
  21.     if command == 'ACTION':
  22.         print(f'We are left with {budget:.2f} leva.')
Add Comment
Please, Sign In to add comment