0% found this document useful (0 votes)
16 views21 pages

Food Project

Uploaded by

nalafe9189
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views21 pages

Food Project

Uploaded by

nalafe9189
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

PROJECT FILE

COMPUTER SCIENCE
(083)

ON

(Online Food Ordering System)

Submitted By-
Name: Hemant Kumar
Class: XII
Roll No.:
INDEX
● Certificate
● Acknowledgment
● Introduction
● Hardware and Software Requirements
● Code Implementation
● Outputs
● Bibliography
CERTIFICATE
This is to certify that (Insert your name), of class
XII of The Rajdhani Public School, Vikas Nagar,
has completed his project “Project Name” under my
supervision. He showed utmost sincerity in
completion of his project.
I certify that this project is up to my expectations
and as per the guidelines issued by CBSE, New Delhi.

__________________
Mrs. Priyanshi
ACKNOWLEDGEMENT

I am highly obliged and grateful to my respected


teacher, Mrs. Priyanshi, who has given me useful
guidance and instructions to complete this project. It
gives me immense pleasure to express my deep
sense of gratitude to our respected teacher for her
inspiration and motivation throughout the course of
computer preparation. Her contribution of ideas to
this file and its contents is par excellence and
without her help, the contribution of computer
project may not be possible.

__________________
Your Name
XII
INTRODUCTION
Put introduction to your project here
HARDWARE & SOFTWARE
SPECIFICATIONS
Hardware:

Intel Pentium D processor with 3.00 GHz CPU clock speed


1 GB of RAM
80 GB of Hard Disk Space

Software:
Microsoft Windows XP/Vista/7
Python IDLE 3.7 or above
MySQL 5.6
CODE IMPLEMENTATION
<put your code here in this font only with headings s in bold(if
needed)>
#Python-MySql Connection

import mysql.connector as sql

conn=sql.connect(host="localhost", user="root", passwd="mysql",


database="Food")

if conn.is_connected():

print("SUCCESSFULLY CONNECTED TO DATABASE")

print()
print(" ORDER YOUR FOOD HERE")

c1=conn.cursor()

print("1.CREATE YOUR ACCOUNT")


print("2.LOG IN")
print("3.EXIT")
print()

#Creating an User Account...

choice=int(input("ENTER YOUR CHOICE:"))

if choice ==1:
cust_name=input("Enter your Name:")
account_no=int(input("Enter your own account number:"))
address=input("Enter your address:")
password=input("Enter your password:")
SQL_insert="INSERT into myc
VALUES('{}',
{},'{}','{}')".format(cust_name,account_no,address,password)
c1.execute(SQL_insert)
conn.commit()
print()
print()
print(".......ACCOUNT CREATED SUCCESSFULLY.......")

if choice==3:
print("THANK YOU FOR VISITING")

#Filling Login Details...

if choice==2:
print('')
print('TO LOGIN FILL THIS DETAILS')
print('')
cust_name=input('Enter your Name:')
print('')
account_no=int(input('Enter your Accont No:'))
print(' ')
password=input('Enter your Password:')
print(' ')
c1=conn.cursor()
c1.execute('select * from myc')
data=c1.fetchall()
count=c1.rowcount

#Checking whether Customer Details Match or Not...

found=False
for row in data:
if (cust_name in row) and (account_no in row) and (password
in row):
found=True
else:
continue

#If any one of the Detail is not Correct....

if found==False:
print("Something Went wrong...Please Try Again!!!!")

else:

#SuccessFully Login

print('WELCOME TO YOUR FOOD SERVICE')


print(' ')
print('TO SEE CUSTMER DETAILS PRESS :1')
print(' ')
print('TO UPDATE DETAILS PRESS :2')
print(' ')
print('TO EXIT PRESS :3')
print(' ')
print('TO ORDER FOOD:4')
print(' ')
print('TO SEE ORDERED FOOD:5 ')
print(' ')
print('WANT TO RATE US ?:6')
print(' ')

c2=int(input('Enter your choice:'))


if (c2==1):
c1=conn.cursor()
c1.execute('select * from myc')
data=c1.fetchall()
count=c1.rowcount
print('Total custmer is',count)
for row in data:
print(row)
print("VISIT AGAIN")

elif (c2==2):
print('')
print('SELECT WHAT YOU WANT TO UPDATE:')
print('')
print('1. Name')
print('2. Address')
print('3. Password')
print('')

choice =int(input('Enter your Choice:'))


c1=conn.cursor()

if choice==1:
cust_name=input('Enter your New Name:')
st="UPDATE myc SET Cust_Name='{}'
WHERE Account_No={}".format(cust_name,account_no)

show='select * from myc Where Account_No=account_no'

c1.execute(st)

conn.commit()

c1.execute(show)

#Showing Changes in Details....

record=c1.fetchall()
for row in record:
if account_no in row:
print(row)

elif choice==2:
address=input("Enter your New Address:")
st="UPDATE myc SET Address='{}'

WHERE Account_No={}".format(address,account_no)
show='select * from myc
WHERE Account_No=account_no'

c1.execute(st)
conn.commit()

c1.execute(show)

#Showing Changes in Details....

record=c1.fetchall()
for row in record:
if account_no in row:
print(row)

else:
Pass=input("Enter your New Password:")

st="UPDATE myc SET Password='{}' WHERE

Account_No={}".format(Pass,account_no)
show='select * from myc Where Account_No=account_no'
c1.execute(st)
conn.commit()

c1.execute(show)

#Showing Changes in Details....

record=c1.fetchall()
for row in record:
if account_no in row:
print(row)

conn.commit()

print('YOUR DETAILS ARE SUCESSFULLY UPDATED')

elif (c2==3):

print('THANK YOU FOR VISITING')

#Order Food

elif(c2==4):

cust_name=input("Enter your Name:")


address=input("Enter your Address:")
fn=""
amount=0
choice="y"

#For Ordering Multiple Food Items....

while choice=="y":

f_name=input("Enter the name of Food:")


price=int(input("Enter the cost of your Food:"))
fn+=f_name+'('+'Rs.'+str(price)+')'+','
amount+=price
choice=input("Want to Order More Food??..y/n:")

v_SQL_insert="insert into sales

VALUES('{}',{},'{}',
{},'{}')".format(cust_name,account_no,fn,amount,address,)
c1.execute(v_SQL_insert)
conn.commit()
show='select * from sales Where Food_Name=fn'
c1.execute(show)

#Customer's Entered Details With His/Her Bill....

print("Your Bill")

record=c1.fetchall()
for row in record:
if account_no in row:
print(row)

print("SUCESSFULLY ORDERED")

elif(c2==5):

c1=conn.cursor()
c1.execute('select * from sales')
data=c1.fetchall()
count=c1.rowcount

print("Total order Food is",count)


#Details of All Customers who ordered Food....

for row in data:


print(row)
print("VISIT AGAIN")

elif (c2==6):

print('RATE US FOR YOUR SERVICE')


rating=int(input("ENTER YOUR RATING:(1 to 5 Rating):"))

print()

print('THANK YOU FOR',rating,'STAR RATING')

else:

print("ERROR,ERROR...........")
OUTPUTS
<Delete these outputs and insert yours, these are for your
guidance purpose only>
BIBLIOGRAPHY

BOOKS USED:
● SUMITA ARORA CS (XII)
WEBSITES:
● http//www.cbse.nic.in
● http//www.google.co.in

You might also like