From a0addea2b7bbdac244420ec917c0f3c14c4c8831 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 30 Jun 2019 15:05:38 +0300 Subject: Added some of the stuff I have done while learning Python --- Python/Beginner training/011 FitnessEquipment.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Python/Beginner training/011 FitnessEquipment.py (limited to 'Python/Beginner training/011 FitnessEquipment.py') 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 -- cgit v1.2.3