You are on page 1of 56

SRI GURU NANAK PUBLIC SCHOOL

ACADEMIC YEAR: 2021-22

PROJECT REPORT ON

FOOD ORDERING SYSTEM

NAME : KARAN BHATT

ROLL NO :

CLASS : XII-A

SUBJECT : COMPUTER SCIENCE

SUB CODE : 083

PROJECT GUIDE : PGT (CS)

[1]
SRI GURU NANAK PUBLIC SCHOOL

CERTIFICATE

This is to certify that the Project entitled FOOD ORDERING SYSTEM is a bonafide
work done by _____ADITYA_____ of class XII Session 2021-22 in partial
fulfillment of CBSE’s AISSCE Examination 2022 and has been carried out under my
direct supervision and guidance. This report or a similar report on the topic has not
been submitted for any other examination and does not form a part of any other
course undergone by the candidate.

_________
PGT Comp Sci
Master IC 
Examiner:

 Name: _______________                          

 Signature:

[2]
TABLE OF CONTENTS

S NO DESCRIPTION PAGE NO

01 ACKNOWLEDGEMENT 04

02 PROJECT LOGBOOK 05

03 INTRODUCTION 06

04 OBJECTIVES OF THE PROJECT 07

05 TEAM ROLE 08

06 THEORETICAL BACKGROUND 09-13

07 FLOW CHART 14-20

08 SOURCE CODE 21-40

09 OUTPUT 41-54

HARDWARE AND SOFTWARE


11 55
REQUIREMENTS

12 BIBLIOGRAPHY 56

[3]
ACKNOWLEDGEMENT

Apart from the efforts we made, the success of any project depends largely on
the encouragement and guidelines of many others. I take this opportunity to express
my gratitude to the people who have been instrumental in the successful completion
of this project. I express deep sense of gratitude to almighty God for giving me
strength for the successful completion of the project. I express my heartfelt gratitude
to my parents for constant encouragement while carrying out this project.

I gratefully acknowledge the contribution of the individuals who contributed in


bringing this project up to this level, who continues to look after me despite my
flaws, I express my deep sense of gratitude to the luminary The Principal,
who has been continuously motivating and extending their helping hand to us.

I express my sincere thanks to the academician The Vice Principal,


Mrs. Shikha Gupta, for constant encouragement and the guidance provided
during this project

I am overwhelmed to express my thanks to The Administrative Officer for


providing me an infrastructure and moral support while carrying out this project in
the school.
My sincere thanks to Mrs. Honey Kaur, Master In-charge, A guide, Mentor all the
above a friend, who critically reviewed my project and helped in solving each
and every problem, occurred during implementation of the project The guidance and
support received from all the members who contributed
and who are contributing to this project, was vital for the success of the project. I am
grateful for their constant support and help.

[4]
PROJECT LOGBOOK
PROJECT NAME: _FOOD ORDERING SYSTEM_

SCHOOL NAME: __SRI GURU NANAK PUBLIC SCHOOL_

YEAR/CLASS: ______2021-22_________

TEACHER NAME: __MRS. HONEY KAUR__

TEAM MEMBER NAMES:

1. _______ADITYA__________

2. __HARSHPREET KAUR____

3. _____KARAN BHATT______

[5]
INTRODUCTION

This programme first asks the user that this is a first time he using the programme

on his/her system. If the entered option is correct the programme automatically run

the commands which is necessary to run this programme perfectly. This programme

helps the user to order food from various restaurant. After entering details, this

programme automatically shows the names of Restaurant. The user can choose the

restaurant name to view its Menu card and order food that he likes. This programme

also allows the user to enter the feedback. This programme admin controls has

various kinds of options like create a new menu card, update a menu card, delete a

menu card, see customer details and see the feedback of the customer. However,

this admin function can only be accessible only if the entered admin-id and

password is correct.  

[6]
OBJECTIVES OF THE PROJECT

The objective of this project is to let the students apply the programming knowledge

into a real- world situation/problem and expose the students how programming skills

help in developing a good software.

1. Write programs utilizing modern software tools.

2. Apply object-oriented programming principles effectively when developing

small to medium sized projects

3. Write effective procedural code to solve small to medium sized problems.

4. Students will demonstrate a breadth of knowledge in computer science, as

exemplified in the areas of systems, theory and software development.

5. Students will demonstrate the ability to conduct research or applied Computer

Science project, requiring writing and presentation skills which exemplify

scholarly style in computer science.

[7]
TEAM ROLES

ROLE ROLE DISCRIPTION TEAM MEMBER NAME


CREATE MODULES CREATE_RES,
PROGRAMMER READ_RES & RES_1 AND CREATE ADITYA
CUSTOMER CONTROLS
PROGRAMMER CREATE MODULES RES_2, RES_3, HARSHPREET KAUR
RES_4 & SEARCH_RES
PROGRAMMER AND CREATE ADMIN CONTROLS AND KARAN BHATT
DEBUGGER DEBUG THE CODE

[8]
THEORETICAL BACKGROUND

What is Python?

Python is an open source, Object-Oriented-High-Level programming language

developed by Guido Van Rossum in 1991 at the National Research Institute for

Mathematics, Netherlands. 

Features of Python:

 It is an interactive, interpreted language.

 It is a loosely typed object –oriented language.

 It is a free open –source and portable language,

 It takes less time to develop programs.

 It is extensible / extendable and highly efficient.

 It supports GUI.

 It can be easily compatible with other languages like C, C++ etc.

 It is used for both scientific and non-scientific programming.

[9]
Installing Python:
It can be installed by using website:
https://www.python.org/downloads/

Interacting with Python:

Python programs can be run in two ways:

 Using Command line window 

[10]
 Using IDLE

What is File Handling?

A file in itself is a bunch of bytes stored on some storage devices like hard-disk,

thumb-drive etc. The data files can be stored in two ways: i. Text files ii. Binary files

A text file stores information in ASCII or Unicode characters, where each line of text

is terminated, (delimited) with a special character known as EOL (End of Line)

character. In text files some internal translations take place when this EOL character

is read or written. A binary file is just a file that contains information in the same

format in which the information is held in memory, i.e., the file content that is

returned to you is raw (with no translation or no specific encoding). The open()

function is used to open a data file in a program through a file-object (or a file-

handle). A file-mode governs the type of operations (e.g., read/ write/ append)

possible in the opened file i.e., it refers to how the file will be used once it's opened.
[11]
A text file can be opened in these file modes: 'r', 'w', 'a', 'r+', 'w+', 'a+' A binary file

can be opened in these file modes: 'rb', 'wb', 'ab', 'r+b'('rb+'), 'w+b'('wb+');

a+b'('ab+'). The three file reading functions of Python are: read(), readline(),

readlines() While read() reads some bytes from the file and returns it as a string,

readline() reads a line at a time and readlines() reads all the lines from the file and

returns it in the form of a list. The two writing functions for Python data files are

write() and writelines(). While write() writes a string in file, writelines() writes a list in

a file. The input and output devices are implemented as files, also called standard

streams. There are three standard streams: stdin (standard input), stdout (standard

output) and stderr (standard error) The absolute paths are from the topmost level of

the directory structure. The relative paths are relative to current working directory

denoted as a dot(.) while its parent directory is denoted with two dots(..). The full

name of a file or a directory is called pathname. Steps to Process a file: there are

five steps to use files in the python program.

i. Determine the type of file usage Under this step, you need to determine
whether you need to open the file for reading purpose (input type of usage) or
writing purpose (output type of usage).
ii. Open the file and assign its reference to a file-object or file-handle Next, you
need to open the file using open() and assign it to a file-handle on which all
the file-operations will be performed. Just remember to open the file in the
file-mode that you decided in step 1.
iii. Now process as required as per the situation, you need to write instructions
to process the file as desired. For example, you might need to open the file
and then read it one line at a time while making some computation, and so
on.

[12]
iv. Close the file This is very important step especially if you have opened the
file in write mode. This is because, sometimes the last lap of data remains in
buffer and is not pushed on to disk until a close() operation is performed.

6.2.1 What is Text File Handling?

A text file stores information in the form of a stream of ASCII or Unicode


characters (the one which is default for your programming platform). In text files,

each line in text is terminated, (delimited) with a special character (as per the
Operating System) known as EOL (End of Line) character. In text files, some
internal transformation take place when this EOL character is read or written. In
Python, by default, this EOL character is newline character (“\n”) or carriage-return,
newline combination (“\r\n”):

(i) Regular Text Files: These are the text files which stores the text in the
same form as typed. Here the newline character ends a line and the text
translation takes place. These files have a file extension as .txt.
(ii) Delimited Text Files: In these text files, a specific character is stores to
separate the values, i.e., after each value, e.g., a tab or a comma after
every value.

 When a tab character is used to separate the values stored, these are
called TSV files (Tab Separated Values files). These files can take the
extension as .txt or .csv.
 When a comma is used to separate the values stored, these are called
CSV files (Comma Separated Values files). These files take the
extension as .csv.

FLOW CHART
[13]
START

Print ("\n")

print ("pleas… ")

print("\n")

print (“If your entered…")

print("\n")

print("\n")

Check=input(“are u running……..”)

NEXT PAGE

[14]
PREVIOUS PAGE
IF CHECK! =Y or
CHECH! =N: Check
PROGRAMME (y/n) IF CHECK == N:
TERMINATED

IF CHECK== y:

CREATING NECESSARY
FILES REQUIRED TO RUN
THE PROGRAMME

print (“necessary…”)

FOOD=
IF FOOD == FALSE:
(TRUE/
LOOP TERMINATED
FALSE)

NEXT PAGE

PREVIOUS
PAGE

[15]
X=int(input(“Enter your choice”))

PREVIOUS
PAGE

[16]
PAGE NO 19
IF X==1:

PRINT(“1. CREATE….”)

PRINT(“2. UPDATE……”)

PRINT(“3. DELETE……..”)

PRINT(“4. CUSTOMER DETAILS”)

PRINT(“5. CUSTOMER FEEDBACK”)

PRINT(“6. BACK TO MAIN MENU”)

PRINT(“7. EXIT”)

A=int(input(“Enter the
choice ”))

A=(1/2/ if A==7:
NEXT PAGE 3/4/5/6
/7) program ended

IF X==3:
PREVIOUS
DELETE A MENU CARD BY USING PAGE
OS MODULE

[17]
PAGE NO. 17

[18]
Name=input(“enter your name”)

Age=input(“enter your age”)

Gender=input(“enter your
gender”)

Address=input(“enter….”)

SAVE THOSE DETAILS INTO TEXT FILE

Print (“1. Buy a meal”)

Print (“2. Enter feedback”)

Print (“3. Back to main menu “)

Print (“4. Exit”)

At=int (input (“enter your choice: “))

NEXT
PAGE

PREVIOUS
PAGE

[19]
At x==1:
At x==2: At= User can choose a restaurant,
User can write his/her (1/2/3/4 order the food and the pay bill
feedback ) with the help of read_res and
search_res modules

At x==3: At x==4:

The loop gets terminated The program gets terminated

SOURCE CODE

res_1 (Module)

c=[["ALAK"],[["Indian_veg"],["Mix_veg ","130"],["Dal_makhni ","90"],


["Dal_butter_fry ","75"],["Paneer_butter_masala ","75"],["kadai_paneer ","150"],
[20]
["Chana_masala ","105"],["Kashmiri_aludam ","115"],["Nabaratana_korma ","175"],
["Sahi_paneer ","180"]],
[["Indian_rice"],["Steam_rice ","70"],["Jeera_rice ","85"],["Veg_pulao ","135"],
["Kashmiri_pulao ","185"],["Paneer_pulao ","160"]],
[["Chinese_veg"],["Paneer_tikka(6pcs) ","160"],["Chilli_potato ","100"],
["Chilly_chowmein ","120"],["Momos ","65"],["Honey_chilly_potato ","110"]],
[["Roti"],["Tandoori_roti ","15"],["Butter_tandoori_roti ","20"],["Plain_roti ","35"],
["Butter_naan ","40"],["Masala_kulcha ","50"]],
[["Non_veg"],["Chicken_kasa ","150"],["Handi_mutton ","190"],["Chicken_bharta
","160"],
["Chicken_patiala ","270"],["Mutton_biryani ","180"],["Chivken_biryani ","180"]]]
def write1():
a=open(c[0][0]+".txt","w")
for i in c:
if len(i)==1:
for j in i:
a.write(j)
a.write("\n")
else:
for k in i:
for m in k:
a.write(m)
a.write("\n")
a.close()

res_2 (module)

x=[["KADIARSH_FAST_FOOD_PARADISE"],[["BURGERS "],
["Tikki_burger ","75"],["Egg_burger ","55"],["cheese_burger ","150"],
[21]
["Cruncy_cheese_burger ","110"],["Paneer_spicy_burger ","140"],["Ham_burger
","250"],
["Tandoori_chicken_burger ","100"],["chicken_burger ","120"],
["Ham_and_chicken_burger ","350"],
["Spicy_grilled_chicken_burger ","160"],["Kadirsh_special_burger ","170"]],
[["WRAPS "],["Tikki_wrap ","65"],["Crunchy_wrap ","90"],["Sezhwan_wap ","100"],
["Cheese_wrap ","75"],["Corn_wrap ","80"],["Chicken_wrap ","90"],
["Tandoori_chicken_wrap ","120"],
["Grilled_chicken_wrap ","140"],["Kadiarsh_chicken_wrap ","170"]],[["PIZZAS "],
["Margherita ","199"],["Cheese_&_corn ","265"],["Farm_house ","215"],
["Mexican_green_wave ","400"],["Peppy_paneer ","395"],
["Paneer_makhani ","350"],["Chicken_pizza ","550"]],[["DRINKS "],
["Mineral_water ","20"],["Cola ","40"],["Cold_coffee ","70"],["Lemon_soda ","30"],
["Lassi ","50"],
["Mango_shake ","70"],["Strawberry_shake ","70"],["Choclate_shake ","100"],
["Kadiarsh_milkshake ","120"]]]
def write2():
a=open(x[0][0]+".txt","w")
for i in x:
if len(i)==1:
for g in i:
a.write(g)
a.write("\n")
else:
for k in i:
for m in k:
a.write(m)
a.write("\n")
a.close()

[22]
res_3(module)

c=[["3yo_restaurant"],[["Soup"],["Veg_sweet_corn_soup ","80"],["Veg_hot_N_soup
","85"],
["Chicken_sweet_corn_soup ","100"],["Chicken_clear_soup ","90"],
["Chicken_hot_N_sour_soup ","120"],["Chicken_wt_noodles ","120"]],
[["Veg_states "],["Crispy_chiily_babycorn ","145"],["Crispy_mushroom_paper_salt
","170"],
["Veg_fried_ball ","100"],["Fried_panner ","155"]],
[["Rice_and_noodles "],["Veg_fried_rice ","120"],["Mixed_fried_rice ","190"],
["Egg_fried_rice ","120"],["Chicken_fried_rice ","150"],["Veg_chowmein ","70"],
["Mixed_chowmein ","160"],["Egg_chowmein ","80"],["Chicken_chowmein ","115"],
["Prawn_chowmein ","140"]],
[["Chinese "],["Veg_baby_corn ","155"],["Chilli_mushroom ","180"],["Chilli_paneer
","150"],
["Veg_manchurian ","115"],["Garlic_chicken ","170"],["Hot_garlic_chicken ","175"],
["Szechwan_chicken ","185"],["Honkong_chicken ","185"]]]
def write3():
a=open(c[0][0]+".txt","w")
for i in c:
if len(i)==1:
for j in i:
a.write(j)
a.write("\n")
else:
for k in i:
for m in k:
a.write(m)
a.write("\n")
a.close()
[23]
res_4(module)

x=[["KADIARSH_SOUTH_INDIAN_FOOD"],[["BREAKFAST "],["Medhu_vada ","20"],


["Idly ","15"],
["Curd_vada ","30"],["Sambar_vada ","20"],["Rava_kesari ","40"],["Ghee_pongal
","45"],
["Chow_chow_bath ","45"],["Poori_masala ","40"]],[["DOSA_VARITIES "],
["Uthhappam ","120"],["Plain_dosa ","80"],["onion_dosa ","90"],["paper_dosa
","95"],
["Masala_dosa ","110"],["Neer_dosa ","100"],["Rava_masala_dosa ","110"],
["Set_dosa ","85"],
["Paper_masala_dosa ","120"],["Onion_uthappam ","115"],["Tomato_uthappa
","120"],
["Special_kadiarsh_dosa ","180"]],[["LUNCH_DINNER "],["Chapathi_kurma
","40"],
["Parota_kurma ","45"],["Curd_rice ","45"],["Sambar_rice ","45"],["Variety_rice
","45"],
["Veg_biriyani ","50"],["Mini_meals ","65"],["South_indian_thali_meal ","120"]],
[["EVENING_SPECIAL "],["Rava_idly ","30"],["Akki_roti ","25"],["Ragi_roti ","30"],
["samar_idly ","30"],["Adai_avial ","35"]],[["HOT_DRINKS "],["Coffee ","20"],["Tea
","20"],
["Milk ","20"],["Horlicks ","30"],["Bournvita ","30"],["Boost ","30"],["Badam_milk
","40"],
["special_kadiarsh_milk ","55"]]]
def write4():
a=open(x[0][0]+".txt","w")
for i in x:
[24]
if len(i)==1:
for g in i:
a.write(g)
a.write("\n")
else:
for k in i:
for m in k:
a.write(m)
a.write("\n")
a.close()

res_read(module)

def read(res):
a=open(res+".txt","r")
z=a.readlines()

for i in z:
s=i.split()
if len(s)==1:
for j in s:
print("\n")
print("*************************************"*2)
print(" "*(30-int(round(len(j))/2)),j)
print("*************************************"*2)
print("\n")

else:
[25]
b=len(s[0])
print(s[0]," "*(60-b),s[1])
print("\n")
a.close()

create_res(module)

def res(res_name):
x=[[res_name]]
y=True
while y==True:
a=str(input("Enter the type of food ( use underscore instead of spaces ): "))
n=int(input("Enter the number of food items of this type : "))
z=[[a]]
for i in range(0,n):
d=str(input("Enter the food item ( use underscore instead of spaces ): "))
t=str(input("Enter the price of the item type : "))
z+=[[d+" ",t]]
x+=[z]
ch=str(input("Want to enter more type of food (y/n) : "))
if ch in ("n","N","No","NO","no"):
y=False
if ch not in ("n","N","No","NO","y","Y","Yes","YES","yes"):
print(".............your input is wrong so the program assumed no..........")
y=False
a=open(x[0][0]+".txt","w")
for i in x:
if len(i)==1:
for j in i:
[26]
a.write(j)
a.write("\n")
else:
for k in i:
for m in k:
a.write(m)
a.write("\n")
a.close()

res_search(module)

def search(x,y):
f=open(x+".txt","r")
h=f.readlines()
d=1234
for i in h:
m=i.split()
if len(m)>1:
if m[0]==y:
d=12345
return [m[0],int(m[1])]
if d==1234:
s=[y+" not found",0]
return s
f.close()

[27]
MAIN CODE

import os

import res_1
import res_2
import res_3
import res_4
[28]
import create_res
import res_read
import res_search

print("\n")
print("NOTE 1: please enter the information as instructed .")
print("Note 2: please write underscore('_') instead of spaces.")
print("\n")

check=str(input("Are you running this program for the first time in your system
(y/n) :"))
if check in ("y","Y","Yes","YES","yes"):
res_1.write1()
res_2.write2()
res_3.write3()
res_4.write4()
cus=open("Customer.txt","w")
cus.writelines([" NAME "," AGE "," GENDER "," PHONE "," ADDRESS ","\n"])
cus.writelines([" Ankit "," 24 "," male "," 9742472940 "," c-
90,ADARSH_ROAD,NEAR_METRO_STATION,DELHI-110032 ","\n"])
cus.close()
f201=open("res_names.txt","w")
f201.writelines(["RESTAURANT_NAME\
n","KADIARSH_FAST_FOOD_PARADISE\
n","KADIARSH_SOUTH_INDIAN_FOOD\n","ALAK\n","3yo_restaurant\n"])
f202=open("customer_feedback.txt","w")
f202.writelines(["CUSTOMER_NAME ","FEEDBACK\n"])
f202.writelines(["Ankit ","it is a very good thing that we can choose our own
restaurant.\n"])
print("...............Necessary files created................")
[29]
cus.close()
f201.close()
f202.close()

if check in ("n","N","No","no","NO","y","Y","Yes","YES","yes"):
food=True
while food==True:
print("\n")
print("\n")
print("**"*58)
print("\n")
print(" "*50+"Food Ordering System")
print("\n")
print("**"*58)
print("**"*58)
print("\n")
print("1. login as Admin ")
print("2. login as customer ")
print("3. exit")
print("\n")
x=int(input("enter your choice (1,2,3):"))
print("\n")
print("You choose option ",x)
pat=0
if x==1:
food1=True
while food1==True:
print("\n")
print("\n")

[30]
print("****Enter Your Details****")
print("\n")
admin=str(input("Enter Admin ID : "))
password=str(input("Enter Password : "))
adm=open("Admin.txt","r")
z=adm.readlines()
s=[]
for i in z:
q=i.split()
s+=[q]
pa=False
for i in s:
if i[0]==admin and i[1]==password:
print("\n")
print(".......Login Successfull..........")
print("\n")
pa=True
ad=True
while ad==True:
print("\n")
print("*************LOGIN AS A ADMIN***************")
print("1 : Create a New Menu ")
print("2 : Update a Menu Card")
print("3 : Delete a Menu Card")
print("4 : See Customer information")
print("5 : See Customer Feedback")
print("6 : Back To Main Menu")
print("7 : Exit ")
print("\n")

[31]
a=int(input("Enter the choice (1,2,3,4,5,6,7) :"))
print("\n")
if a==1:
name=str(input("Enter the name of restaurant : "))
f65=open("res_names.txt","a")
f65.write(name)
f65.write("\n")
f65.close()
create_res.res(name)
print("..........seccessfully created a new one............")

elif a==2:
f20=open("res_names.txt","r")
print("*************Select From The Given List**************")
print("\n")
tt=0
stp=f20.readlines()
for i in stp:
if tt>0:
print(i)
tt+=1
print("\n")
select=str(input("Enter the name of restaurant : "))
select141=select+"\n"
if select141 in stp:
res_read.read(select)
f80=open(select+".txt","r")

[32]
sty=f80.readlines()
print("\n")
foo1=str(input("enter the name of the food that you want to
update : "))
a=False
for e in sty:
s99=e.split()
if s99[0]==foo1:
a=True
if a==False:
print("............food item not found.............")
f20.close()
f80.close()
else:
f15=open("new_file.txt","w")
foo2=str(input("enter new name : "))
pr4=str(input("enter new price : "))
for i in sty:
s34=i.split()
if s34[0]!=foo1:
f15.write(i)
if s34[0]==foo1:
f15.writelines([foo2+" ",pr4+"\n"])
print("..........MENU CARD UPDATED.............")
f15.close()
f20.close()
f80.close()
os.remove(select+".txt")
os.rename("new_file.txt",select+".txt")

[33]
else:
print(".......... restaurant cannot be found............")

elif a==3:
f45=open("res_names.txt","r")
print("*************Select From The Given List**************")
print("\n")
cp=0
st=f45.readlines()
for i in st:
if cp>0:
print(i)
cp+=1
print("\n")
delete=str(input("Enter the name of restaurant : "))
delete1=delete+"\n"
if delete1 in st:
os.remove(delete+".txt")
f10=open("new_file.txt","w")
for i in st:
if i!=delete:
f10.write(i)
f10.close()
f45.close()
os.remove("res_names.txt")
os.rename("new_file.txt","res_names.txt")
print(".............menu card successfully seleted............")
else:
print("..........File cannot be found............")

[34]
elif a==4:
cust=open("Customer.txt","r")
r3=cust.readlines()
for i in r3:
s3=i.split()
print(s3[0]," "*(30-len(s3[0])),s3[1]," "*(15-len(s3[1])),s3[2],"
"*(20-len(s3[2])),s3[3]," "*(20-len(s3[3])),s3[4]," "*(40-len(s3[4])))
elif a==5:
f202=open("customer_feedback.txt","r")
rep=f202.readlines()
for i in rep:
s40=i.split()
print(s40[0]," "*(30-len(s40[0])),s40[1])

elif a==6:
print("You choose option ",a)
print("\n")
food1=False
ad=False
elif a==7:
print("You choose option ",a)
print("\n")
print("*"*49+"Thanks for coming"+"*"*49)
food=False
food1=False
ad=False
else:
[35]
print("Your input is wrong please enter a valid input")
print("\n")
if pa==False:
pat+=1
if pat==3:
print(".................NO TRIAL LEFT FOR YOU. SO, THE PROGRAM
HAS BEEN TERMINATED......................")
print("\n")
print("")
print("\n")
food=False
food1=False
else:
print("............Please Enter a Valid ID And Password.....",(3-pat),"tries
left.....")

elif x==2:
food2=True
while food2==True:
print("\n")
print("***************LOGIN AS CUSTOMER***************")
print("\n")
print("****Enter Your Details****")
print("\n")
name=str(input("Enter Your Name : "))
print("\n")
print("1 : Want To Buy Meal")

[36]
print("2 : Want To Enter Feedback")
print("3 : Back To Main Menu")
print("4 : Exit")
print("\n")
at=int(input("Enter the choice (1,2,3,4) :"))
print("\n")
if at==1:
age=str(input("Enter Your Age : "))
gender=str(input("Enter Your Gender : "))
phone=str(input("Enter Your Mobile No. : "))
address=str(input("Enter your Address : "))
cus=open("Customer.txt","a")
cus.writelines([" ",name," ",age," ",gender," ",phone," ",address,"\n"])
cus.close()

f20=open("res_names.txt","r")
print(“\n”)
print("*************Select From The Given List**************")
print("\n")
tt=0
stp=f20.readlines()
for i in stp:
if tt>0:
print(i)
tt+=1
print("\n")
select=str(input("Enter the name of restaurant : "))
data=[]
select1=select+"\n"

[37]
if select1 in stp:
res_read.read(select)
we=True
while we==True:
see=str(input("Enter the product name : " ))
data+=[res_search.search(select,see)]
wr=str(input("want to Enter more(y/n) : "))
if wr in ("n","N","No","no","NO"):
we=False
if wr not in ("n","N","No","no","NO","y","Y","Yes","YES","yes"):
print("...........NO VALID INPUT SO THE PROGRAM IS
ASSUMED NO............")
we=False

sum=0
print("\n")
print("*************************************************")
print(" "*(24-int(round(len(select))/2)),select)
print("*************************************************")
print(" "*20,"BILL")
print("-------------------------------------------------")
print("FOOD NAME"," "*31,"PRICE")
print("-------------------------------------------------")
for i in data:
sum+=i[1]
print(i[0]," "*(40-len(i[0])),i[1])
print("************************************************")
print("TOTAL"," "*29,"(RS.)",sum)
print("************************************************")
print("\n")
[38]
print("**************Thanks for coming*****************")
food2=False
food=False
else:
print(".........Please Enter The Valid Input..........")
if at==2:
f202=open("customer_feedback.txt","a")
feed=str(input("Enter your feedback : "))
f202.writelines([name+" ",feed+"\n"])
f202.close()

if at==3:

food2=False
if at==4:
print("You choose option ",at)
print("\n")
print("*"*49+"Thanks for coming"+"*"*49)
food=False
food2=False
if at>4:
print("Your input is wrong please enter a valid input")

elif x==3:
print("\n")
print("*"*49+" Thanks for coming "+"*"*49)
food=False

else:
[39]
print("\n")
print("Your input is wrong please enter a valid input")
print("\n")

if check not in ("n","N","No","no","NO","y","Y","Yes","YES","yes"):


print("..........s.....NO VALID INPUT THIS PROGRAM HAS BEEN
TERMINATED..................")

OUTPUT
ADMIN CONTROLS:

IF THE ADMIN ID AND PASSWORD IS INCORRECT 3 TIMES


SIMULTANEOUSLY.
THEN,
OUTPUT:

[40]
IF THE ADMIN ID AND PASSWORD IS CORRECT.
THEN,
1. Creating a new menu.

OUTPUT:

[41]
2. Update a menu card.

OUTPUT:

[42]
3. Delete a menu card

OUTPUT:

[43]
4. See customer information

OUTPUT:

5. See customer feedback


[44]
OUTPUT:

CUSTOMER CONTROLS:
[45]
1. Buy meal

OUTPUT:

[46]
[47]
[48]
2. Enter feedback

OUTPUT:

[49]
SCREENSHOTS OF TEXT FILES

TEXT FILE 1

[50]
TEXT FILE 2

[51]
TEXT FILE 3

TEXT FILE 4

[52]
TEXT FILE 5

[53]
TEXT FILE 6

TEXT FILE 7

TEXT FILE 8

[54]
HARDWARE AND SOFTWARE REQUIREMENTS

 Python IDLE.
 Modern Operating System:
 Windows 7 or 10

 Mac OS X 10.11 or higher, 64-bit

 Linux: RHEL 6/7, 64-bit (almost all libraries also

work in Ubuntu)
 x86 64-bit CPU (Intel / AMD architecture)
 4 GB RAM
 5 GB free disk space

[55]
BIBLIOGRAPHY

1. Made by HARSHPREET KAUR, ADITYA AND KARAN BHATT of

CLASS 12-A as a project for COMPUTER SCIENCE of SESSION

2021-2022.

2. Taking the help of internet for searching menu cards.

3. Use PYTHON-IDLE for developing the food ordering system.

4. Use various in-built function:

 Creating modules and importing them to main file.

 While loop and for loop.

 Conditional statements (if, elif, else).

 Logical operators, arithmetic operators and so on.

 Use of data types like Integer, strings, list, tuples, etc.

 Use of basic text file handling.

[56]

You might also like