Advertisement
Merucial

Cat Shelter

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