Mirch Masala
Mirch Masala
CLASS : XIA
SESSION : 2021-22
KENDRIYA VIDYALAYA SABARMATI
CERTIFICATE
Date :
1 Acknowledgement
2 Aim and Introduction
3 Hardware and Software
4 Code
5 Output
6 Bibliography
ACKNOWLEDGEMENT
AIM:
To create a user friendly application that is similar food
serving in various hotel with invoice bill using python
INTRODUCTION:
This project has been developed to know how to accept
order of different dishes of restaurant ,display the list of
various dishes,sabzi,chapati,After accepting order
generate bill etc is written in Python. To achieve this, idle
and spyder python editor which is an integrated
development environment are used.
SOFTWARE:
idle
spyder
MS WORD
WINDOWS 10, 8
HARDWARE:
4 GB RAM
STANDARD I/O DEVICES
***********************SOURCE CODE OF PROJECT ************************
troti=0
tsabzi=0
total=0
tsoup=0
d={}
def address():
print('~'*77)
print("\n\
\t Mirch Masala Gandhinagar\n\
\t FF104/118, Supermall-2, infocity,\n\
\t Gandhinagar 382007, Phone : 91-0-9825144444\n\
")
print('~'*77)
def billhead():
print("\n\
\t\t TAX INVOICE\n\
\t\tORIGINIAL FOR RECIPIENT")
print()
print('='*72)
print('='*72)
print("Bill No. Bill Date Rm/Tbl#\t No. of Cust.")
print('='*72)
print('='*72)
def displaymenu():
print('-'*72)
print("S. NO.\t\t DISHES \t\t\t COST\t")
print('-'*72)
print('\t ','*'*20,'SOUP','*'*20,'\t\n'
"1.\t\t Hot & Sour Soup \t\t 40\t\n"
"2.\t\t Manchow Soup \t\t\t 60\t\n"
"3.\t\t Tomato Soup \t\t\t 40\t\n"
"4.\t\t Corn Soup \t\t\t 40\t\n"
"5.\t\t Cream Soup \t\t\t 50\t\n")
print('\t ','*'*20,'SABZI','*'*19,'\t\n'
"1.\t\t Paneer Kadhai \t\t\t 360\t\n"
"2.\t\t Kaju Curry \t\t\t 370\t\n"
"3.\t\t Sabzi Tarkari \t\t\t 330\t\n"
"4.\t\t Paneer Handi \t\t\t 360\t\n"
"5.\t\t Balti Paneer \t\t\t 360\t\n")
print('\t ','*'*16,'ROTI','*'*16,'\t\n'
"1.\t\t Butter Roti \t\t\t 20\t\n"
"2.\t\t Kulcha \t\t\t 20\t\n"
"3.\t\t Naan \t\t\t\t 20\t\n"
"4.\t\t Puri \t\t\t\t 15\t\n"
"5.\t\t Garlic Naan \t\t\t 30\t\n")
def bill(bn,tbl,cust):
global d
print(d)
address()
billhead()
import datetime
date=datetime.datetime.today()
print("bill No:",bn,' ',"Date:",date,'',"Table No:",tbl,'',"No.Of Cust:",cust)
print("********Total bill*********".center(46))
print("Food Item Price Quantity Total Price")
for i in d:
print(i,"\t ",d[i][0],"\t ",d[i][1],"\t ",d[i][2])
total=tsoup+tsabzi+troti
print('='*72)
print(" Total Payment:",total)
cgst=total*0.25
print(" CGst :",cgst)
print(" SGst :",cgst)
ftotal=total+2*cgst
print("====================================================
==============")
print(" Final Payment:",ftotal)
print("====================================================
===============")
print("***************************Visit Again******************************")
def soup(soup1):
global tsoup
global d
print('\t ','*'*20,'SOUP','*'*20,'\t\n'
"1.\t\t Hot & Sour Soup \t\t 40\t\n"
"2.\t\t Manchow Soup \t\t\t 60\t\n"
"3.\t\t Tomato Soup \t\t\t 40\t\n"
"4.\t\t Corn Soup \t\t\t 40\t\n"
"5.\t\t Cream Soup \t\t\t 50\t\n")
ans="y"
while ans=="y":
soup=int(input("select soup (1/2/3/4/5):"))
q= int(input("enter quantity:"))
if soup==1:
print("you have ordered",q,"Hot and Sour Soup")
soup1=soup1+q*40
ans=input("do you want more soup?(y/n)").lower()
d["Hot and Sour"]=["40 ",q,q*40]
elif soup==2:
print("you have ordered",q,"Manchow Soup")
soup1=soup1+q*60
ans=input("do you want more soup?(y/n)").lower()
d["Manchow Soup"]=["60 ",q,q*60]
elif soup==3:
print("you have ordered",q,"Tomoto Soup")
soup1=soup1+q*40
ans=input("do you want more soup?(y/n)").lower()
d["Tomato Soup "]=["40 ",q,q*40]
elif soup==4:
print("you have ordered",q,"Corn Soup")
soup1=soup1+q*40
ans=input("do you want more soup?(y/n)").lower()
d["Corn Soup "]=["40 ",q,q*40]
elif soup==5:
print("you have ordered",q,"Cream Soup")
soup1=soup1+q*50
ans=input("do you want more soup?(y/n)").lower()
d["Cream Soup "]=["50 ",q,q*50]
else:
print("Please select from 1/2/3/4/5")
tsoup=tsoup+soup1
return tsoup,d
def sabzi(sabzi1):
global tsabzi
global d
print('\t ','*'*20,'SABZI','*'*19,'\t\n'
"1.\t\t Paneer Kadhai \t\t\t 360\t\n"
"2.\t\t Kaju Curry \t\t\t 370\t\n"
"3.\t\t Sabzi Tarkari \t\t\t 330\t\n"
"4.\t\t Paneer Handi \t\t\t 360\t\n"
"5.\t\t Balti Paneer \t\t\t 360\t\n")
ans="y"
while ans=="y":
sabzi=int(input("enter dish no:"))
q= int(input("enter quantity:"))
if sabzi==1:
sabzi1=sabzi1+q*360
print("you have ordered",q,"dishes of Paneer Kadhai")
ans=input("do you want more sabzi?(y/n)").lower()
d["PaneerKadhai"]=["360",q,q*360]
elif sabzi==2:
sabzi1=sabzi1+q*370
print("you have ordered",q,"dishes of Kaju Curry")
ans=input("do you want more sabzi?(y/n)").lower()
d["Kaju Curry "]=["370",q,q*370]
elif sabzi==3:
sabzi1=sabzi1+q*330
print("you have ordered",q,"dishes of Sabzi Tarkari")
ans=input("do you want more sabzi?(y/n)").lower()
d["SabziTarkari"]=["330",q,q*330]
elif sabzi==4:
sabzi1=sabzi1+q*360
print("you have ordered",q,"dishes of Paneer Handi")
ans=input("do you want more sabzi?(y/n)").lower()
d["Paneer Handi"]=["360",q,q*360]
elif sabzi==5:
sabzi1=sabzi1+q*360
print("you have ordered",q,"dishes of Balti Paneer")
ans=input("do you want more sabzi?(y/n)").lower()
d["Balti Paneer"]=["360",q,q*360]
else:
print("Please select from 1/2/3/4/5")
tsabzi=tsabzi+sabzi1
return tsabzi,d
def roti(roti1):
global troti
global d
print('\t ','*'*16,'ROTI','*'*16,'\t\n'
"1.\t\t Butter Roti \t\t\t 20\t\n"
"2.\t\t Kulcha \t\t\t 20\t\n"
"3.\t\t Naan \t\t\t\t 20\t\n"
"4.\t\t Puri \t\t\t\t 15\t\n"
"5.\t\t Garlic Naan \t\t\t 30\t\n")
ans="y"
while ans=="y":
roti=int(input("enter dish no:"))
q= int(input("enter quantity:"))
if roti==1:
print("you have ordered",q,"Butter Roti")
roti1=roti1+q*20
ans=input("do you want more roti?(y/n)").lower()
d["Butter Roti "]=["20 ",q,q*20]
elif roti==2:
print("you have ordered",q,"Kulcha")
roti1=roti1+q*20
ans=input("do you want more roti?(y/n)").lower()
d["Kulcha "]=["20 ",q,q*20]
elif roti==3:
print("you have ordered",q,"Naan")
roti1=roti1+q*20
ans=input("do you want more roti?(y/n)").lower()
d["Naan "]=["20 ",q,q*20]
elif roti==4:
print("you have ordered",q,"Puri")
roti1=roti1+q*15
ans=input("do you want more roti?(y/n)").lower()
d["Puri "]=["15 ",q,q*15]
elif roti==5:
print("you have ordered",q,"Cheese Garlic Naan")
roti1=roti1+q*30
ans=input("do you want more roti?(y/n)").lower()
d["Garlic Naan "]=["30 ",q,q*30]
else:
print("Please select from 1/2/3/4/5")
troti=troti+roti1
return troti,d
def main():
ans="y"
address()
while True:
print('\t\t',"-"*43)
print("\t\t\t Welcome to mirch masala")
print()
print("\t\tInput '1' to display menu")
print("\t\tInput '2' to place order for food items")
print("\t\tInput '3' to print bill")
print("\t\tInput '4' to exit")
num= int(input("Enter number:"))
if num==1:
displaymenu()
ans=input("proceed to order (y/n)?")
if ans== "y":
main()
elif num==2:
print("[write 'exit' to return to main menu]")
st="y"
while st=="y":
dish=input("dish name(soup,sabzi,roti):").lower()
if dish=="soup":
t,d=soup(tsoup)
print(t,"***",d)
st=input("do you want to order more food?(y/n)").lower()
elif dish=="sabzi":
t,d=sabzi(tsabzi)
print(t,"***",d)
st=input("do you want to order more food?(y/n)").lower()
elif dish=="roti":
t,d=roti(troti)
print(t,"***",d)
st=input("do you want to order more food?(y/n)").lower()
else:
main()
elif num==3:
bn1=input("Bill no.:")
tbl1= input("table no.:")
cust1= input("no. of customers:")
bill(bn1,tbl1,cust1)
else:
exit(0)
main()
OUT PUT OF PROJECT
MAIN SCREEN
DISPLAY MENU:
Accept soup order