-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5_Small_shop.py
More file actions
42 lines (38 loc) · 1.13 KB
/
5_Small_shop.py
File metadata and controls
42 lines (38 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
product = input()
town = input()
quantity = float(input())
price = 0.0 #def a variable ,after we will use instead of print()
if town == "Sofia":
if product == "coffee":
price = 0.50 * quantity
elif product == "water":
price = 0.80 * quantity
elif product == "beer":
price = 1.20 * quantity
elif product == "sweets":
price = 1.45 * quantity
elif product == "peanuts":
price = 1.60 * quantity
if town == "Plovdiv":
if product == "coffee":
price = 0.40 * quantity
elif product == "water":
price = 0.70 * quantity
elif product == "beer":
price = 1.15 * quantity
elif product == "sweets":
price = 1.30 * quantity
elif product == "peanuts":
price = 1.50 * quantity
if town == "Varna":
if product == "coffee":
price = 0.45 * quantity
elif product == "water":
price = 0.70 * quantity
elif product == "beer":
price = 1.10 * quantity
elif product == "sweets":
price = 1.35 * quantity
elif product == "peanuts":
price = 1.55 * quantity
print(price)