aboutsummaryrefslogtreecommitdiff
path: root/Python/Beginner training/002 Pets.py
diff options
context:
space:
mode:
authorSyndamia <kami02882@gmail.com>2019-07-14 18:24:40 +0300
committerSyndamia <kami02882@gmail.com>2019-07-14 18:24:40 +0300
commit65edf7296baf48aad1b4e0c09b57f1a7f48791a8 (patch)
tree0c163496769d66363a4907cab3e72f42e5030c75 /Python/Beginner training/002 Pets.py
parenta0addea2b7bbdac244420ec917c0f3c14c4c8831 (diff)
downloadSelf-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/002 Pets.py')
-rw-r--r--Python/Beginner training/002 Pets.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/Python/Beginner training/002 Pets.py b/Python/Beginner training/002 Pets.py
deleted file mode 100644
index bdc5a3b..0000000
--- a/Python/Beginner training/002 Pets.py
+++ /dev/null
@@ -1,18 +0,0 @@
-import sys
-import os
-import math
-
-days_absent = int(input('Type the number of days that you wil be absent: '))
-left_food_kg = float(input('Type the number of left food in kg: '))
-daily_consumption_first = float(input('Type the daily consumption of the first cat in kg: '))
-daily_consumption_second = float(input('Type the daily consumption of the second cat in kg: '))
-
-left_food_kg -= days_absent * daily_consumption_first
-left_food_kg -= days_absent * daily_consumption_second
-
-if left_food_kg >= 0:
- print('The cats are well fed')
- print('{} kilos of food left'.format(left_food_kg))
-else:
- print('The cats are hungry')
- print('{} more kilos of food are needed'.format(int(abs(left_food_kg)))) \ No newline at end of file