Food Atm Project
Food Atm Project
Food Atm Project
Lab Certificate
Acknowledgement
Working description of the
project
Software requirement
Functions& methods and their
objectives
Code
Output
Bibliography
CERTIFICATE
Subject teacher:
Ms. Yashika
External Examiner:
_______________________
ACKNOWLEDGEMENT
Saurav
The Concept of Food ATM
This project is designed for keeping the records of the Food atm
. It is created to manage different operations related to the details
of food atm.
The project consists of five options that are as follows:
1. Add employee
2.Customer details
3. Food deatails
4. Food order
5. View food booking
Software Requirement
Language : Python
DBMS : MySQL
Functions & methods and their
objectives
1. BUILT-IN Functions & methods
mydb=mysql.connector.connect(host="localhost",
user="root",
passwd ="admin",
database="food")
mycursor=mydb.cursor()
'''----------------------------------------------------------------'''
def Customer():
L=[]
L.append(c_id)
L.append(c_name)
L.append(cphone)
payment=int(input("Enter payment method (credit card/Debit Card:
"))
L.append(payment)
L.append(pstatus)
L.append(email)
L.append(empid)
orderid=input("enter orderid")
L.append(orderid)
L.append(date)
cust=(L)
mycursor.execute(sql,cust)
mydb.commit()
def Employee():
L=[]
L.append(Emp_id)
L.append(e_name)
L.append(emp_g)
L.append(eage)
L.append(emp_phone)
L.append(pwd)
EMP=(L)
mycursor.execute(sql,EMP)
mydb.commit()
#Emp_id (PK) E_name Emp_g e_age Emp_phone pwd
'''-----------------------------------------------------------------------------------------------
------'''
def Food():
L=[]
L.append(Food_id)
L.append(Food_name)
L.append(Food_size)
L.append(prize)
Food=(L)
mycursor.execute(sql,Food)
mydb.commit()
#Food_id (PK Foodname Food_size price
'''--------------------------------------------------------------'''
def OrderFood():
L=[]
L.append(OrderF_id)
L.append(C_id)
L.append(Emp_id)
L.append(Food_id)
L.append(Food_qty)
Total_price=input("Enter Total_price")
L.append(Total_price)
OrderFood=(L)
sql="insert into OrderFood
(OrderF_id,C_id,Employee_id,Food_id,Food_qty,Total_price ) values
(%s,%s,%s,%s,%s,%s)"
mycursor.execute(sql,Food)
mydb.commit()
'''----------------------------------------------------------------'''
def View():
print("1. Employee")
print("2. Customer")
print("3. Food")
if ch==1:
rl=(s,)
mycursor.execute(sql,rl)
elif ch==2:
rl=(s,)
mycursor.execute(sql,rl)
elif ch==3:
rl=(s,)
elif ch==4:
mycursor.execute(sql)
res=mycursor.fetchall()
mycursor.execute(sql,rl)
for x in res:
print(x)
'''def feeDeposit():
L=[]
roll=int(input("Enter the roll number : "))
L.append(roll)
L.append(feedeposit)
L.append(month)
fee=(L)
mycursor.execute(sql,fee)
mydb.commit()'''
'''-----------------------------------------------------------------------------'''
def FoodPurchase():
mycursor.execute(sql)
res=mycursor.fetchall()
for x in res:
print(x)
L=[];
L.append(c1)
rl=(c1,)
mycursor.execute(sql,rl)
res=mycursor.fetchall()
for x in res:
print(x)
'''---------------------------------------------------------------------------------'''
try:
except ValueError:
else:
if(userInput == 1):
Employee()
elif (userInput==2):
Customer()
elif (userInput==3):
Food()
elif (userInput==4):
OrderFood()
elif (userInput==5):
View()
else:
MenuSet()
def runAgain():
runAgn=input("\nwant to run Again Y/N")
while runAgn.lower()=='y':
if(platform.system()=="Windows"):
print(os.system('cls'))
else:
print(os.system('clear'))
MenuSet()
runAgain()
OUTPUT
OUTPUT-1
OUTPUT-2
OUTPUT-3
OUTPUT-4
Bibliography