Restaurant Billing System
Restaurant Billing System
CHIDAMBARAM
PROJECT REPORT
ON
RESTAURANT BILLING SOFTWARE
FOR
Submitted by
Kedharanathan. C. R. Roll No:
Class: XII
(2023-24)
EDISON G AGORAM MEMORIAL SCHOOL
CERTIFICATE
This project work is not plagiarized and has not been submitted
elsewhere.
I thank God for showering his immense blessings that helped me in each
step of my progress towards the completion of this project.
1. Introduction
2. Project Synopsis
3. System Implementation
5. References
PROJECT SYNOPSIS
INTRODUCTION
The project has been taken up to automate the existing manual billing
system in restaurants. The billing information can be saved and retrieved easily.
The Restaurant billing system is built to help the operator to calculate and
display bills and serve the customer in a faster and efficient manner. This software
project consists of easy options to help the employee in easy bill calculation and
providing an efficient customer service.
OBJECTIVES
● Allows ease of billing transactions to make the process simpler and quicker.
● Easily add a new customer phone number during billing and later edit the details.
● Offer gift vouchers for star customers who have points more than 500.
● Easily add / edit/ delete items in the menu card based on categories.
● Online ordering or drive through takeaway ordering of food will enable the
restaurant to expand.
better way.
SYSTEM IMPLEMENTATION
HARDWARE USED
SOFTWARE USED
✔ Windows 10 (OS)
✔ Python 3.9.1 (Front end)
✔ Mysql 8.0.26 (Backend)
✔ Word 2013 (Documentation)
SYSTEM DESIGN AND DEVELOPMENT
DATABASE DESIGN
Database: Restaurant
Table: Password
Table: Menucard
Table: Sales_Report
Table: Employee
Table: Customer
# password table
c.execute("create table if not exists password(mode varchar(6),pass_word varchar(12))")
c.execute("insert into password values('admin','admin@2023')")
c.execute("insert into password values('user','user@2023')")
# employee table
c.execute("create table if not exists Empl(Empid varchar(5) primary key, Ename char(20),gender char(1),desig varchar(20), salary
varchar(20), email varchar(40), phno varchar(16))")
c.execute("insert into Empl values('E1','Adarsh','M','Assistant Manager','₹800000','[email protected]','+91 9200394867')")
c.execute("insert into Empl values('E2','Anish','M','CFO','₹3000000','[email protected]','+91 9500394867')")
c.execute("insert into Empl values('E3','Arul','M','Manager','₹1000000','[email protected]','+91 9900394867')")
c.execute("insert into Empl values('E4','Pranav','M','General Manager','₹150000','[email protected]','+91 9990394867')")
c.execute("insert into Empl values('E5','Kedharanathan','M','CEO','₹5000000','[email protected]','+91 9944384833')")
# menu table
c.execute("Drop table if exists menu")
c.execute("create table if not exists menu(itemid varchar(5) primary key,itemname varchar(30),price varchar(10),variety char(15),v_nv
char(3))")
c.execute("insert into menu values('V1','Rava Kesari','₹75.00','sweet','v')")
c.execute("insert into menu values('V2','Carrot Halwa','₹65.00','sweet','v')")
c.execute("insert into menu values('V3','Bread Halwa','₹70.00','sweet','v')")
c.execute("insert into menu values('V4','Kashi Halwa','₹70.00','sweet','v')")
c.execute("insert into menu values('V5','Mysore Pak (3pcs)','₹70.00','sweet','v')")
c.execute("insert into menu values('V6','Badshah (3pcs)','₹65.00','sweet','v')")
c.execute("insert into menu values('V7','Fresh Cream Tomato Soup','₹120.00','soup','v')")
c.execute("insert into menu values('V8','Sweet Corn Soup','₹100.00','soup','v')")
c.execute("insert into menu values('V9','Mushroom Soup','₹85.00','soup','v')")
c.execute("insert into menu values('V10','Hot And Pepper','₹100.00','soup','v')")
c.execute("insert into menu values('N1','French Onion(Chicken)','₹125.00','soup','nv')")
c.execute("insert into menu values('N2','Garlic Chicken Soup','₹120.00','soup','nv')")
c.execute("insert into menu values('N3','Hot And Sour Lobster Soup','₹130.00','soup','nv')")
c.execute("insert into menu values('N4','Mutton Pepper Soup','₹110.00','soup','nv')")
c.execute("insert into menu values('N5','Crab Soup','₹150.00','soup','nv')")
c.execute("insert into menu values('V11','Gobi 65','₹120.00','starter','v')")
c.execute("insert into menu values('V12','Paneer Tikka','₹125.00','starter','v')")
c.execute("insert into menu values('V13','Mushroom Tikka','₹130.00','starter','v')")
c.execute("insert into menu values('V14','Gobi Manchurian','₹125.00','starter','v')")
c.execute("insert into menu values('V15','Honey Potato','₹120.00','sweet','v')")
c.execute("insert into menu values('V16','Paneer 65','₹120.00','starter','v')")
c.execute("insert into menu values('N6','Chicken 65','₹150.00','starter','nv')")
c.execute("insert into menu values('N7','chicken 88','₹190.00','starter','nv')")
c.execute("insert into menu values('N8','chicken 007','₹210.00','starter','nv')")
c.execute("insert into menu values('N9','Chicken Tikka','₹150.00','starter','nv')")
c.execute("insert into menu values('N10','Chicken Tandoori','₹150.00','starter','nv')")
c.execute("insert into menu values('N11','Honey Chicken','₹125.00','starter','nv')")
c.execute("insert into menu values('N12','Crab Lollipop','₹165.00','starter','nv')")
c.execute("insert into menu values('N13','Fish Fingers','₹170.00','starter','nv')")
c.execute("insert into menu values('N14','Golden Prawn','₹190.00','starter','nv')")
c.execute("insert into menu values('N15','Grilled Fish','₹150.00','starter','nv')")
c.execute("insert into menu values('N16','Fish 65','₹150.00','starter','nv')")
c.execute("insert into menu values('N17','Grill Chicken','₹250.00','starter','nv')")
c.execute("insert into menu values('V17','Dosa','₹40.00','maindish','v')")
c.execute("insert into menu values('V18','Idli(2 pcs)','₹25.00','maindish','v')")
c.execute("insert into menu values('V19','Ghee Roast','₹50.00','maindish','v')")
c.execute("insert into menu values('V20','Masala Dosa','₹65.00','maindish','v')")
c.execute("insert into menu values('V21','Podi Dosa','₹55.00','maindish','v')")
c.execute("insert into menu values('V22','Mushroom Dosa','₹65.00','maindish','v')")
c.execute("insert into menu values('V23','Paneer Dosa','₹65.00','maindish','v')")
c.execute("insert into menu values('V24','Onion Dosa','₹60.00','maindish','v')")
c.execute("insert into menu values('V25','Upma','₹40.00','maindish','v')")
c.execute("insert into menu values('V26','Idiyappam','₹50.00','maindish','v')")
c.execute("insert into menu values('V27','Pongal','₹55.00','maindish','v')")
c.execute("insert into menu values('N18','Chicken Dosa','₹70.00','maindish','nv')")
c.execute("insert into menu values('N19','Mutton Dosa','₹90.00','maindish','nv')")
c.execute("insert into menu values('N20','Prawn Dosa','₹120.00','maindish','nv')")
c.execute("insert into menu values('V28','Phulka','₹40.00','roti','v')")
c.execute("insert into menu values('V29','Chapati','₹25.00','roti','v')")
c.execute("insert into menu values('V30','Naan','₹40.00','roti','v')")
c.execute("insert into menu values('V31','Butter Naan','₹50.00','roti','v')")
c.execute("insert into menu values('V32','Paratha','₹20.00','roti','v')")
c.execute("insert into menu values('V33','Tandoori Roti','₹50.00','roti','v')")
c.execute("insert into menu values('V34','Paneer Butter Masala','₹165.00','gravy','v')")
c.execute("insert into menu values('V35','Mushroom Gravy','₹150.00','gravy','v')")
c.execute("insert into menu values('V36','Baby Corn Gravy','₹170.00','gravy','v')")
c.execute("insert into menu values('V37','Malai Cofta (Red/White)','₹190.00','gravy','v')")
c.execute("insert into menu values('V38','Dal Makhani','₹150.00','gravy','v')")
c.execute("insert into menu values('V39','Panneer Lababdar','₹190.00','gravy','v')")
c.execute("insert into menu values('V40','Palak Panneer','₹175.00','gravy','v')")
c.execute("insert into menu values('V41','Mixed Veggie Gravy','₹150.00','gravy','v')")
c.execute("insert into menu values('V42','Mixed Fruits And Veggie Gravy','₹180.00','gravy','v')")
c.execute("insert into menu values('N21','Butter Chicken','₹180.00','gravy','nv')")
c.execute("insert into menu values('N22','Chettinad Chicken','₹190.00','gravy','nv')")
c.execute("insert into menu values('N23','Kadai Chicken','₹170.00','gravy','nv')")
c.execute("insert into menu values('V43','Curd Rice','₹45.00','rice','v')")
c.execute("insert into menu values('V44','Sambar Rice','₹55.00','rice','v')")
c.execute("insert into menu values('V45','Dal Rice','₹50.00','rice','v')")
c.execute("insert into menu values('V46','Rasam Rice','₹45.00','rice','v')")
c.execute("insert into menu values('V47','Podi Rice','₹50.00','rice','v')")
c.execute("insert into menu values('V48','Fried Rice','₹120.00','rice','v')")
c.execute("insert into menu values('V49','Baby Corn Fried Rice','₹135.00','rice','v')")
c.execute("insert into menu values('V50','Paneer Fried Rice','₹170.00','rice','v')")
c.execute("insert into menu values('V51','Mushroom Fried Rice','₹150.00','rice','v')")
c.execute("insert into menu values('N24','Chicken Gravy Rice','₹150.00','rice','nv')")
c.execute("insert into menu values('N25','Mutton Gravy Rice','₹165.00','rice','nv')")
c.execute("insert into menu values('N26','Prawn Thokku Rice','₹150.00','rice','nv')")
c.execute("insert into menu values('N27','Fish Gravy Rice','₹150.00','rice','nv')")
c.execute("insert into menu values('N28','Chicken Fried Rice','₹210.00','rice','nv')")
c.execute("insert into menu values('N29','Mutton Fried rice','₹230.00','rice','nv')")
c.execute("insert into menu values('N30','Prawn Fried rice','₹250.00','rice','nv')")
c.execute("insert into menu values('V52','Paneer Biryani','₹190.00','biryani','v')")
c.execute("insert into menu values('V53','Mushroom Biryani','₹150.00','biryani','v')")
c.execute("insert into menu values('V54','Plain Biryani','₹135.00','biryani','v')")
c.execute("insert into menu values('N31','Chicken Biryani','₹170.00','biryani','nv')")
c.execute("insert into menu values('N32','Mutton Biryani','₹210.00','biryani','nv')")
c.execute("insert into menu values('N33','Prawn Biryani','₹210.00','biryani','nv')")
c.execute("insert into menu values('N34','Egg Omelette','₹15.00','sidedish','nv')")
c.execute("insert into menu values('N35','Egg Kalaki','₹20.00','sidedish','nv')")
c.execute("insert into menu values('N36','Halfboil','₹20.00','sidedish','nv')")
c.execute("insert into menu values('V55','Gulab Jamoon','₹60.00','desert','v')")
c.execute("insert into menu values('V56','Paneer Jamun','₹65.00','desert','v')")
c.execute("insert into menu values('V57','Butterscotch (3 Scoops)','₹60.00','desert','v')")
c.execute("insert into menu values('V58','Chocolate (3 Scoops)','₹55.00','desert','v')")
c.execute("insert into menu values('V59','Vanilla (3 Scoops)','₹50.00','desert','v')")
c.execute("insert into menu values('V60','Strawberry (3 scoops)','₹55.00','desert','v')")
c.execute("insert into menu values('V61','Cranberry (3 scoops)','₹55.00','desert','v')")
c.execute("insert into menu values('V62','Blueberry (3 scoops)','₹55.00','desert','v')")
c.execute("insert into menu values('V63','Black Currant (3 scoops)','₹55.00','desert','v')")
c.execute("insert into menu values('V64','Coffee Choco Crunch (3 scoops)','₹55.00','desert','v')")
c.execute("insert into menu values('V65','Chocolate Milkshake','₹110.00','desert','v')")
c.execute("insert into menu values('V66','Strawberry Milkshake','₹110.00','desert','v')")
c.execute("insert into menu values('V67','Coffee Milkshake','₹110.00','desert','v')")
c.execute("insert into menu values('V68','Butterscotch Milkshake','₹130.00','desert','v')")
c.execute("insert into menu values('V69','Blueberry Milkshake','₹150.00','desert','v')")
c.execute("insert into menu values('V70','Vanilla Milkshake','₹110.00','desert','v')")
c.execute("insert into menu values('V71','Black Current Milkshake','₹120.00','desert','v')")
c.execute("insert into menu values('V72','Fruit Falooda','₹110.00','desert','v')")
c.execute("insert into menu values('V73','Degree Coffee','₹45.00','hot beverages','v')")
c.execute("insert into menu values('V74','Caramel Coffee','₹65.00','hot beverages','v')")
c.execute("insert into menu values('V75','Butter Coffee','₹55.00','hot beverages','v')")
c.execute("insert into menu values('V76','Cappuccino','₹60.00','hot beverages','v')")
c.execute("insert into menu values('V77','Espresso','₹60.00','hot beverages','v')")
c.execute("insert into menu values('V78','Indian Chai','₹45.00','hot beverages','v')")
c.execute("insert into menu values('V79','Butter Chai','₹65.00','hot beverages','v')")
c.execute("insert into menu values('V80','Masala Chai','₹65.00','hot beverages','v')")
c.execute("insert into menu values('V81','Hot Chocolate','₹50.00','hot beverages','v')")
# customer table
c.execute("create table if not exists customer(cname char(20),cph varchar(16) primary key,caddress varchar(45),cpoints int,cemail
char(40))")
c.execute("insert into customer values('Adarsh','+91 7586942130','25,kamaraj nagar,chennai-600028',0,'[email protected]')")
c.execute("insert into customer values('Arul','+91 9874562565','321,main street,vandalur-602324',0,'[email protected]')")
c.execute("insert into customer values('jagan','+91 8025654789','3B,nehru nagar,keelpakkam-601235',0,'[email protected]')")
c.execute("insert into customer values('Marwan','+91 9847542580','17,jaganmahan street,chennai=600025',0,'[email protected]')")
# sales report
c.execute("create table if not exists Sales_Report(bill_no varchar(30),date varchar(10),time varchar(10),itemid varchar(5) , dish
varchar(30),cost varchar(10),quantity int,price varchar(12))")
# header
print()
print()
print()
Header=""" WELLCOME TO
SREE PRANAVA BALAJI BHAVAN
-By Kedharanathan Groups"""
print("-"*(len(Header)-87))
print("-"*(len(Header)-87))
print(Header)
print("-"*(len(Header)-87))
print("-"*(len(Header)-87))
print()
print()
print()
while True:
# choosing profile
P=input("Enter 'C' if you are customer and 'E' if you are employee : ")
print()
print()
if P=='E' or P=='C':
# employee profile
if P=="E":
c.execute("select * from password")
pt=c.fetchall()
uA=pt[0][0]
pA=pt[0][1]
u=pt[1][0]
p=pt[1][1]
# checking mode of employee
while True:
u1=input("Enter User id : ")
print()
p1=input("Enter user password : ")
print()
print()
# admin mode
if (u1==uA or u1==u) and (p1==pA or p1==p) :
if u1==uA and p1==pA:
while True:
# choosing admin options
print("""Admin options:
V: View All The Employees
A: Add Employee
E: Edit Employee
D: Delete Employee
S: View Sales Report
M: Edit Menu card""")
print()
print()
o=input("Enter the options : ")
print()
print()
# deleting employees
elif o.upper()=="D":
while True:
e_id=input("Enter employee id : ")
print()
c.execute("delete empl where empid='{}'".format(e_id))
print("! The record is deleted successfully !")
print()
print()
ch=input('Do you wish to continue in deleting records of employees ? (y/n) : ')
if ch=='n':
print()
print('Breaking...')
print()
break
elif ch=='y':
print()
print()
continue
# sales report
elif o=="S":
while True:
O=input("Enter 'V' to view all sales report and 'S' to view with specifications : ")
print()
print()
if O=='V':
c.execute('Select * from sales_Report')
r=c.fetchall()
column_names = ["Bill Number","Date","Time","ID","Dishes","Cost","Quantity","Price"]
col="| {:24} | {:10} | {:5} | {:5} | {:30} | {:7} | {:6} | {:7} |".format(*column_names)
print("+"+"-"*(len(col)-2)+"+")
print(col)
print("+"+"-"*(len(col)-2)+"+")
for row in r:
print("| {:24} | {:10} | {:5} | {:5} | {:30} | {:7} | {:8} | {:7} |".format(*row))
print("+"+"-"*(len(col)-2)+"+")
print()
print()
elif O=='S':
while True:
date=input("Enter date (in proper format or it causes error !) to view sales details : ")
print()
print()
r=c.fetchall()
if r:
c.execute('Select * from sales_Report')
r=c.fetchall()
column_names = ["Bill Number","Date","Time","ID","Dishes","Cost","Quantity","Price"]
col="| {:30} | {:10} | {:5} | {:5} | {:30} | {:7} | {:6} | {:10} |".format(*column_names)
print("+"+"-"*(len(col)-2)+"+")
print(col)
print("+"+"-"*(len(col)-2)+"+")
for row in r:
print("| {:30} | {:10} | {:5} | {:5} | {:30} | {:7} | {:6} | {:10} |".format(*row))
print("+"+"-"*(len(e_col)-2)+"+")
print()
print()
else:
print("SORRY, WRONG INPUT !!!")
print("ENTER CORRECT VALUES !!!")
print()
print()
continue
else:
print("SORRY, WRONG INPUT !!!")
print("ENTER CORRECT VALUES !!!")
print()
print()
continue
ch=input('Do you wish to continue viewing the Sales Report ? (y/n) : ')
if ch=='n':
print()
print('Breaking...')
print()
break
elif ch=='y':
print()
print()
continue
# sales report
elif o=="S":
while True:
O=input("Enter 'V' to view all sales report and 'S' to view with specifications : ")
print()
print()
if O=='V':
c.execute('Select * from sales_Report')
r=c.fetchall()
column_names = ["Bill Number","Date","Time","ID","Dishes","Cost","Quantity","Price"]
col="| {:24} | {:10} | {:5} | {:5} | {:30} | {:7} | {:6} | {:7} |".format(*column_names)
print("+"+"-"*(len(col)-2)+"+")
print(col)
print("+"+"-"*(len(col)-2)+"+")
for row in r:
print("| {:24} | {:10} | {:5} | {:5} | {:30} | {:7} | {:6} | {:7} |".format(*row))
print("+"+"-"*(len(col)-2)+"+")
print()
print()
elif O=='S':
while True:
date=input("Enter date (in proper format or it causes error !) to view sales details : ")
print()
print()
r=c.fetchall()
if r:
c.execute('Select * from sales_Report')
r=c.fetchall()
column_names = ["Bill Number","Date","Time","ID","Dishes","Cost","Quantity","Price"]
col="| {:30} | {:10} | {:5} | {:5} | {:30} | {:7} | {:6} | {:10} |".format(*column_names)
print("+"+"-"*(len(col)-2)+"+")
print(col)
print("+"+"-"*(len(col)-2)+"+")
for row in r:
print("| {:30} | {:10} | {:5} | {:5} | {:30} | {:7} | {:8} | {:10} |".format(*row))
print("+"+"-"*(len(col)-2)+"+")
print()
print()
else:
print("SORRY, RECORD NOT FOUND !!!")
print("ENTER CORRECT VALUES !!!")
print()
print()
continue
else:
print("SORRY, WRONG INPUT !!!")
print("ENTER CORRECT VALUES !!!")
print()
print()
continue
ch=input('Do you wish to continue viewing the Sales Report ? (y/n) : ')
if ch=='n':
print()
print('Breaking...')
print()
break
elif ch=='y':
print()
print()
continue
# Customer profile
elif P=="C":
# printing menu
print(" Vegetarian : ")
print()
print(" Starters - Sweets : ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'sweet' and v_nv = 'v'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print(" Starters - Soups : ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'soup' and v_nv = 'v'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print(" Starters - Main : ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'starter' and v_nv = 'v'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print(" Mains - South Indian: ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'maindish' and v_nv = 'v'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print(" Mains - Indian Breads : ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'roti' and v_nv = 'v'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print(" Mains - Rice Specials : ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'rice' and v_nv = 'v'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print(" Mains - Gravy : ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'gravy' and v_nv = 'v'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print(" Mains - Biryani : ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'biryani' and v_nv = 'v'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print(" Mains - Desserts : ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'desert' and v_nv = 'v'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print()
print(" Non - Vegetarian (Including Vegetarian) : ")
print()
print(" Starters - Sweets : ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'sweet'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print(" Starters - Soups : ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'soup'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print(" Starters - Main : ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'starter'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print(" Mains - South Indian: ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'maindish'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print(" Mains - Indian Breads : ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'roti'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print(" Mains - Rice Specials : ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'rice'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print(" Mains - Gravy : ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'gravy'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print(" Mains - Biryani : ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'biryani'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print(" Mains - Desserts : ")
print()
c.execute("Select itemid,itemname,price as 'ID','Dishes','Price' from menu where variety = 'desert'")
menu=c.fetchall()
m_column_names = ['ID','Dishes','Price']
m_col="| {:5} | {:30} | {:7} |".format(*m_column_names)
print("+"+"-"*(len(m_col)-2)+"+")
print(m_col)
print("+"+"-"*(len(m_col)-2)+"+")
for row in menu:
print("| {:5} | {:30} | {:7} |".format(*row))
print("+"+"-"*(len(m_col)-2)+"+")
print()
print()
#billing
# footer
print()
print()
print()
Footer=""" THANK YOU
VISIT AGAIN"""
print("-"*(len(Header)-87))
print("-"*(len(Header)-87))
print(Footer)
print("-"*(len(Header)-87))
print("-"*(len(Header)-87))
print()
break
else:
print("!!! SORRY, ENTER CORRECT OPTION !!!")
print()
print()
continue
SAMPLE OUTPUT
REFERENCES