Spocoman

Cat Shelter

Jan 9th, 2022 (edited)
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. food = int(input()) * 1000
  2.  
  3. while True:
  4.     command = input()
  5.     if command == "Adopted":
  6.         break
  7.     food -= int(command)
  8.  
  9. if food >= 0:
  10.     print(f'Food is enough! Leftovers: {food} grams.')
  11. else:
  12.     print(f'Food is not enough. You need {abs(food)} grams more.')
  13.  
Add Comment
Please, Sign In to add comment