Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- budget = float(input())
- actor = input()
- not_enough = False
- pay_check = 0
- while actor != "ACTION":
- if len(actor) <= 15:
- pay_check = float(input())
- if pay_check > budget:
- not_enough = True
- break
- else:
- budget -= pay_check
- else:
- pay_check = budget * 0.2
- if pay_check > budget:
- not_enough = True
- break
- else:
- budget -= pay_check
- actor = input()
- else:
- print(f"We are left with {budget:.2f} leva.")
- if not_enough:
- print(f"We need {(pay_check - budget):.2f} leva for our actors.")
Add Comment
Please, Sign In to add comment