-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathcoffeeshop.py
78 lines (73 loc) · 2.51 KB
/
coffeeshop.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import time
def pos(Menu,orders,Coffe_name,Coffee_size,quantity):
file1=open('D:\pro1234.txt','w')
prz1cal=[]
cofnam=[]
custqua=[]
ttlam=[]
for i in range(orders):
for key,val in Menu.items():
if key==Coffee_name:
if Coffee_size=='full cup':
amount=quantity*val
GST_amount=(amount*13)/100
netprice=(amount+GST_amount)
elif Coffee_size=='small cup':
amount=c*val
GST_amount=(amount*13)/100
netprice=(amount+GST_amount)
prz1cal.append(netprice)
cofnam.append(Coffee_name)
custqua.append(quantity)
ttlam.append(amount)
finalprice=sum(prz1cal)
ttlam1=sum(ttlam)
cstaq=sum(custqua)
a2=str(finalprice)
file1.write(a2)
Option3=int(input("ENTER 3 FOR GENERATE A SLIP"))
if Option3==3:
costumer_name=input("Enter contumer name")
print()
print(''''''' <<--------->> DESIRE DRINKS <<--------->> ''''''')
print('__________')
print(time.strftime('%A %b/%d/%y %I:%M %p'))
print()
print('--------------------------------------------------------------------------------')
print("YOUR NAME:","\t", costumer_name)
print()
print("COFFEE Name:","\t", cofnam)
print()
print("COFFEE QUANTITY","\t",Coffee_size)
print()
print("QUANTITY:","\t", cstaq)
print()
print("AMOUNT: ","\t", ttlam1)
print()
print("GST 13% :","\t", GST_amount)
print()
print("TOTAL AMOUNT:","\t", finalprice)
print('__________')
file1.close()
#drivers code
print('''''
1.Menu
2.Select Items
3.Generate Slip''''')
Option1=int(input("ENTER 1 FOR GO TO MENU"))
if Option1==1:
print(''''' Here's Our MENU ''''')
file1=open('D:\pro123.txt','w')
Menu={'expresso':300,'cappiciano':300,'latte':200,'mocha':200,'flat white':400}
Menu1=str(Menu)
file1.write(Menu1)
print(Menu)print('HOW MANY COFFEES DO YOU WANT??')
orders=int(input('ENTER ORDER NO'))
ask='yes'
while ask=='yes':
Option2=int(input("ENTER 2 FOR SELECT ITEMS"))
if Option2==2:
Coffee_name=input("Enter a Coffee Name: ")
Coffee_size=(input("DO YOU WANT FULL CUP OR SMALL?: "))
quantity=int(input("Enter a quantity:"))
ask=input("DO YOU WANT TO ENTER MORE ITEMS(YESorNO)")