Advertisement
Merucial

Bachelor Party

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