aneliabogeva

Bachelor Party

Jun 10th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. guest = int(input())
  2. command = input()
  3. group = 0
  4. counter = 0
  5. group_cuvert = 0
  6. total_cuverts = 0
  7.  
  8. while command != "The restaurant is full":
  9. group = int(command)
  10. if group < 5:
  11. group_cuvert = group * 100
  12. else:
  13. group_cuvert = group * 70
  14. counter += group
  15. total_cuverts += group_cuvert
  16. command = input()
  17.  
  18. if total_cuverts >= guest:
  19. print(f"You have {counter} guests and {int(total_cuverts) - guest} leva left.")
  20. else:
  21. print(f"You have {counter} guests and {int(total_cuverts)} leva income, but no singer.")
Advertisement
Add Comment
Please, Sign In to add comment