babavyna

Untitled

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