Ip Project (Code) : Harsh, Darshan & Lakshit (Class 12F)
Ip Project (Code) : Harsh, Darshan & Lakshit (Class 12F)
Ip Project (Code) : Harsh, Darshan & Lakshit (Class 12F)
[Class 12F]
import os
import platform
import mysql.connector
global z
mydb=mysql.connector.connect(user='root',password='root',
port='3306',
host='localhost',
database='hotel')
mycursor=mydb.cursor()
def registercust():
L=[]
name=input("enter name:")
L.append(name)
addr=input("enter address:")
L.append(addr)
def classtypeview():
print('Do you want to see class type available? Enter 1 for yes:')
if ch==1:
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
def ticketprice():
if x==1:
s=6000*n
elif x==2:
s=4000*n
elif x==3:
s=2000*n
else:
def menuview():
if ch==1:
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
def orderitem():
global s
print('Do you want to see food menu available? Enter 1 for yes:')
if ch==1:
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
print('What do you want to purchase from above list? Enter your choice.')
d=int(input('Your choice:'))
if d==1:
a=int(input('Enter quantity:'))
s=10*a
elif d==2:
a=int(input('Enter quantity:'))
s=10*a
elif d==3:
a=int(input('Enter quantity:'))
s=20*a
elif d==4:
a=int(input('Enter quantity:'))
s=10*a
print('Your amount for Samosa is:',s,'\n')
elif d==5:
a=int(input('Enter quantity:'))
s=50*a
elif d==6:
a=int(input('Enter quantity:'))
s=30*a
elif d==7:
a=int(input('Enter quantity:'))
s=10*a
elif d==8:
a=int(input('Enter quantity:'))
s=20*a
elif d==9:
a=int(input('Enter quantity:'))
s=50*a
elif d==10:
a=int(input('Enter quantity:'))
s=50*a
print('Your amount for Pasta is:',s,'\n')
elif d==11:
a=int(input('Enter quantity:'))
s=150*a
elif d==12:
a=int(input('Enter quantity:'))
s=20*a
elif d==13:
a=int(input('Enter quantity:'))
s=85*a
else:
def luggagebill():
global z
print('Do you want to see rate for luggage? Enter 1 for yes:')
if ch==1:
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
z=y*100
def ExtraFacilities():
global m
print('Do you want to see rate for ExtraFacilities? Enter 1 for yes:')
if ef==1:
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
print('What do you want to purchase from above list? Enter your choice.')
d=int(input('Your choice:'))
if d==1:
a=int(input('Enter quantity:'))
m=5*a
elif d==2:
a=int(input('Enter quantity:'))
m=1000*a
elif d==3:
a=int(input('Enter quantity:'))
m=750*a
elif d==4:
print('You have Booked an AIRBUS to drop you at your Boarding Gate :')
else:
def ticketamount():
print('Customer name:',a,'\n')
print('Luggage bill:')
print(luggagebill)
print('Food bill:')
print(orderitem)
def Menuset():
print('Enter 8: Exit.')
'''try:
except ValueError:
if userinput==1:
registercust()
elif userinput==9:
registercust()
elif userinput==10:
ticketprice()
elif userinput==11:
menuview()
elif userinput==12:
orderitem()
elif userinput==13:
luggagebill()
elif userinput==14:
ExtraFacilities()
elif userinput==15:
ticketamount()
elif userinput==16:
quit()
else:
Menuset()
def runagain():
while runagn=='y':
if platform.system=='windows':
print(os.system('cls'))
else:
print(os.system('clear'))
Menuset()
runagain()
HARSH SHAH
12 F
MEMBERS:
Harsh,Darshan&Lakshit [12 F]