Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 4. Bachelor Party
- guest = int(input())
- guests_counter = 0
- end_price = 0
- while guest > 0:
- group = input()
- if group != "The restaurant is full":
- if int(group) < 5:
- guests_counter += int(group)
- price = int(group) * 100
- end_price += price
- if int(group) >= 5:
- guests_counter += int(group)
- price = int(group) * 70
- end_price += price
- else:
- break
- if guest > end_price:
- total = guest - end_price
- print(f"You have {guests_counter} guests and {end_price} leva income, but no singer.")
- else:
- total = end_price - guest
- print(f"You have {guests_counter} guests and {total} leva left.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement