Cs Project 1
Cs Project 1
SCHOOL,CHINHAT,LUCKNOW.
Signature of Principal:
INTRODUCTION , OBJECTIVE AND
SCOPE OF THE PROJECT
In our busy lives ,finding a quick and
delicious meal can be difficult. But
worry not as we present to you THE
FOOD PORTAL- a digital heaven for all
your culinary cravings .The control of
this food portal lies in the hands of the
admin as it is secured with a password.
This portal allows the customers to
browse through a tempting menu and
place their order to taste the unique
flavours and satisfy their taste buds.
The exit is as smooth as your favourite
dessert and we are always ready to
welcome you back for your next
gastronomical adventure. Our mission
is to create a vibrant and
interconnected food community. Join
us in this exciting journey and feel free
to provide your suggestions for the
improvement of this food portal.
SYSTEM IMPLEMENTATION
Hardware used:
1)Processor: Intel(R) Core(TM) i3-
10110U CPU @ 2.10GHz 2.59 GHz
2)Installed RAM: 8.00 GB
3)System type: 64-bit operating
system, x64-based processor
4)Pen and touch: No pen or touch
input is used.
Software used:
1)Microsoft Windows 11 as
operating system.
2)Python IDLE 3.11.3
3)MYSQL
PYTHON
Python is a popular programming
language which was created by
Guido van Rossum and released in
1991. It is used to create web
applications and connect database
systems.
Python works on various platforms
and has a simple syntax that allows
developers to write programs with
fewer lines of code.
IDLE(Integrated development and
learning environment) is an
integrated development
environment for python which is
used to execute a single statement
just like python shell and also to
create, modify, and execute python
scripts.
MYSQL
MYSQL is a relational database
management system (RDBMS)
developed by Oracle that is based
on structured query language(SQL).
Python MYSQL Connector is a
python driver that helps to integrate
Python and MYSQL. This python
MYSQL library allows the
conversion between python and
MYSQL data types. MYSQL
connector API is implemented using
pure python and does not require
any third party library.
CODING
import mysql.connector as p
file_obj=p.connect(host='localhost',
user='root',passwd='sk2977',datab
ase='restaurant')
mycursor=file_obj.cursor()
print("********************************
***************************************
**************")
print("Food name:",i[0])
print("Food price:",i[1])
print("Total price:",i[2])
print("Phone number:",i[3])
print("Address:",i[4])
print("********************************
***************************************
**************")
print("********************************
*MENU*******************************
*************")
for i in data:
print("Food no.:",i[0],"|","Food
name:",i[1],"|","Food
price:",i[2],"|","Food type:",i[3])
j=input("Do you want to order
food?")
if j=="Yes":
food_order()
else:
print("Thank You")
print("You have been
redirected to the main page")
values=(name,price,tprice,phone,a
dd)
mycursor.execute(v,values)
file_obj.commit()
else:
print("No data found for the
given food id")
print("******************BILL*********
***********")
print("Food name:",name)
print("Food price:",price)
print("Quantity of food:",qty)
print("Total price:",tprice)
print("Address:",add)
print("Phone number:",phone)
print("********************************
**********")
print("Thanks for ordering food!")
print("Your order has been
confirmed.")
print("You have been redirected
to the main page")
mycursor.execute(v)
file_obj.commit()
print("********************************
**********Your order details are
shown
below********************************
*************")
print("Food name:",i[0])
print("Food price:",i[1])
print("Total price:",i[2])
print("Phone number:",i[3])
print("Address:",i[4])
else:
print("You have not placed any
order")
file_obj.commit()
#Homepage
def admin():
while True:
print("********************************
************************Welcome to
food
portal*********************************
*****************************")
print("1.Admin login")
print("2.Customer login")
print("3.Exit")
y=int(input("Enter option of
your choice"))
if y==1:
ad_panel()
if y==2:
mainmenu()
if y==3:
break
MYSQL DATABASE
FOOD ITEM TABLE:
OUTPUTS
FOOD PORTAL MAIN PAGE:
ADMIN LOGIN OPTION:
FEEDBACK OF CUSTOMER:
ORDER HISTORY OF
CUSTOMER: