aboutsummaryrefslogtreecommitdiff
path: root/Python/Beginner training/011 FitnessEquipment.py
diff options
context:
space:
mode:
authorSyndamia <kami02882@gmail.com>2019-06-30 15:05:38 +0300
committerSyndamia <kami02882@gmail.com>2019-06-30 15:05:38 +0300
commita0addea2b7bbdac244420ec917c0f3c14c4c8831 (patch)
treea05310b0033f995dfd31b5795e7675aa382a18f3 /Python/Beginner training/011 FitnessEquipment.py
parent0c7164435abda2e497957e195e6653f94f20135d (diff)
downloadSelf-learning-a0addea2b7bbdac244420ec917c0f3c14c4c8831.tar
Self-learning-a0addea2b7bbdac244420ec917c0f3c14c4c8831.tar.gz
Self-learning-a0addea2b7bbdac244420ec917c0f3c14c4c8831.zip
Added some of the stuff I have done while learning Python
Diffstat (limited to 'Python/Beginner training/011 FitnessEquipment.py')
-rw-r--r--Python/Beginner training/011 FitnessEquipment.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/Python/Beginner training/011 FitnessEquipment.py b/Python/Beginner training/011 FitnessEquipment.py
new file mode 100644
index 0000000..a8046da
--- /dev/null
+++ b/Python/Beginner training/011 FitnessEquipment.py
@@ -0,0 +1,16 @@
+import sys
+import math
+import random
+import os
+
+total_sum = 0.0
+for x in range(int(input())):
+ item_name = input()
+
+ if item_name == "treadmill": total_sum += 5899
+ elif item_name == "cross trainer": total_sum += 1699
+ elif item_name == "exercise bike": total_sum += 1789
+ elif item_name == "dumbells": total_sum += 579
+ else: print("ERROR, Invalid product name")
+
+print(round(total_sum, 2)) \ No newline at end of file