-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathe-comm-cmr.py
49 lines (35 loc) · 1.31 KB
/
e-comm-cmr.py
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
43
44
45
46
47
48
49
# E-COMMERCE CMR
#
# Start a e-commerce CMR where we apply different discounts to each
# product category (pants-10%, sweaters-5%, t-shirts-20%) and pick them up and VAT
# and campaign info from a list (dynamically)
#
# You first ask what type of product it is and then it
# prints out the price - discount + VAT for each product / price
#
# At the end you print out the total sum for all the prizes as well
# as kampanjinfon
category = input("Enter the product category: ")
products = int(input("Enter the number of products: "))
i = 0
sum = 0
trouss_info = [10, 20, "No campaign offers"]
tshirts_info = [20, 20, "Three for two"]
sweaters_info = [5, 20, "Buy now, pay on one month"]
def countTroussers(pris, info):
for b in range(len(info)):
print(f"Product price with discount and moms is: {pris}")
return pris
def countTshirts(pris,info):
for b in range(len(info)):
print(f"Product price with discount and moms is: {pris}")
return pris
def countSweaters(pris,info):
for b in range(len(info)):
print(f"Product price with discount and moms is: {pris}")
return pris
for i in range(products):
x = float(input("Enter a product price: "))
print(f" The total price for {category} is: {round(sum)} sek" )
def give_info(category):
give_info(category)