Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 04. Puppy Care
- buy_food = int(input())
- food_grams = buy_food * 1000
- food_puppy = input()
- while not food_puppy == "Adopted":
- food_grams -= int(food_puppy)
- food_puppy = input()
- if food_puppy == "Adopted":
- if food_grams < 0:
- print(f"Food is not enough. You need {abs(food_grams)} grams more.")
- else:
- print(f"Food is enough! Leftovers: {food_grams} grams.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement