-
Notifications
You must be signed in to change notification settings - Fork 145
Expand file tree
/
Copy pathcashier.py
More file actions
32 lines (32 loc) · 776 Bytes
/
Copy pathcashier.py
File metadata and controls
32 lines (32 loc) · 776 Bytes
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
#COUNTER
print("***WELCOME TO RAFEEQ DAIRY FARM***")
print()
print("ITEMS PRICES\na.milk 100\nb.curd(sweet) 80\nc.curd(sour) 60\nd.khowa 320 \ne.ghee 560\nf.cream 200")
print()
def shop():
item=input("enter the code of item you want: ")
hm=float(input("enter the number of litres or kgs you want: "))
print()
if item=="a":
m=hm*100
elif item=="b":
m=hm*80
elif item=="c":
m=hm*60
elif item=="d":
m=hm*3200
elif item=="e":
m=hm*560
elif item=="f":
m=hm*200
else:
print("invalid code")
return m
n=int(input("how many items do you need: "))
lst=[]
print()
for i in range(n):
lst.append(shop())
print(f"the total amount for {n} items is {sum(lst)} rupees")
print()
print("thanks for shopping with RDF!")