blob: 47143a327a3a072fac09a5b96485d31c60403589 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import sys
import os
import math
food = int(input('Type bought amount of food in kg: ')) * 1000
days_care = int(input('Type days the the animals wil be taken care of: '))
for i in range(days_care):
daily_consumption = int(input('Food that the animal has eaten that day: '))
food -= daily_consumption
if food >= 0:
print('Food is enough! Leftovers: {} grams'.format(food))
else:
print('Food is not enough. You need {} grams more'.format(abs(food)))
|