diff options
| author | Syndamia <kami02882@gmail.com> | 2019-07-14 18:24:40 +0300 |
|---|---|---|
| committer | Syndamia <kami02882@gmail.com> | 2019-07-14 18:24:40 +0300 |
| commit | 65edf7296baf48aad1b4e0c09b57f1a7f48791a8 (patch) | |
| tree | 0c163496769d66363a4907cab3e72f42e5030c75 /Python/Beginner training/004 TakingCare.py | |
| parent | a0addea2b7bbdac244420ec917c0f3c14c4c8831 (diff) | |
| download | Self-learning-65edf7296baf48aad1b4e0c09b57f1a7f48791a8.tar Self-learning-65edf7296baf48aad1b4e0c09b57f1a7f48791a8.tar.gz Self-learning-65edf7296baf48aad1b4e0c09b57f1a7f48791a8.zip | |
Combined exam exercises files into one file, added a file for OOP exercises
Diffstat (limited to 'Python/Beginner training/004 TakingCare.py')
| -rw-r--r-- | Python/Beginner training/004 TakingCare.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/Python/Beginner training/004 TakingCare.py b/Python/Beginner training/004 TakingCare.py deleted file mode 100644 index 47143a3..0000000 --- a/Python/Beginner training/004 TakingCare.py +++ /dev/null @@ -1,15 +0,0 @@ -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)))
\ No newline at end of file |
