Project
Project
information, Small animals welcome, Private parking, Guarded garage, \24h reception, 24h bar, Beaches
at 500 m, Shuttle bus stop for the airport only 10 minutes\away.\n”
print ("FACILITIES:")
mycursor.close()
db.close()
def hotelfarecal():
while True :
print("\n")
print("--
print ("-----
z =^ prime y^ prime
inputdata ()
return hotelfarecal()
else :
elif ( b == ‘2’) :
z =’ y'
while z=='y':
Display()
return hotelfarecal()
else:
z =^ prime v
while (Z=='y'):
search()
if (z=='n'):
return hotelfarecal()
else:
elif (b=='4'):
z =^ prime y '
delete()
if (z=' n ^ prime ) :
return hotelfarecal()
else:
update()
if ( z ==^ 1 n '):
return hotelfarecal()
else:
elif (b=='6'):
break
else:
def party():
z='y'
print ("\nDue to covid 19 pandamic this facility is presently stopped in accordance \n with the state
guidelines")
#INSERTING DATA
#import mysql.connector
#import random
def inputdata():
r=0
1=0
p=0
s=0
mycursor=db.cursor()
s=0
Ccode=input ("\nEnter Customer Code: ")
print("\n")
while (1):
if (x=-1):
n=int (input("For How Many Nights Did You Stay:")) print ("You have opted room Duplex") s-s+6000*n
elif (x==2):
s=s+5000*n
S=5+4000*n
elif (x-4):
5-5+3000 n
elif (x==5):
n-int (input("For How Many Nights Did You Stay:")); print ("You have opted room Cabana") 5-s+5000*n
Room_no= random.randint (2001, 2501) print("Your Room Number is: ", Room_no)
elif (x=6):
break
else:
print ("Please choose a room") print ("\nYour room rent is", s, 'RS')
print ("\n")
print("RESTAURANT MENU******")
while (1):
if (c=-1):
elif (c==2):
elif (cm):
r=r+110* d
elif (c=-5):
rer+150 d
elif (c=-6):
break
else:
-->Ps6","5.Girlsuit-->Rs8", "6.Next")
while(1) :
if (e-1):
1-143 1
elif (e-2):
1-1+4 f
elif (e--3):
1-145 f
elif (e--4):
elif (e--5):
1-1+6 f
elif (e==6):
break
else:
print ("\n")
if (g==-1):
p=p+60*h
elif (g==2):
p=p+80*h
elif (g==3):
p =p+70^ * h elif(g=-4):
p =p+90^ * h
elif g ==5) :
p = p + 50h
elif (g==6):
break
else:
CALCULATING SUB TOTAL BILL, ADDITIONAL CHARGES AND GRAND TOTAL BILL
SubTotal bill-s+x+1+p
Add charges-1800
Room rent s
Game bill-p
Food_bill-r
Laudry_bill-1
GrandTotal bill-SubTotal_bill+Add_charges
rec-("insert into hoteldata values(s, is, ts, is, is, is, is, is, is, is, is, is, is)")
cotm-("insert into customer values (s, is, is, is, is, is, is, is, is)")
datal (Ccode, Cid_type, Cid_no, Cname, Ccontact_no, Cadd, Cindate, Coutdate, CNationali ty)
data2-(Ccode, Cname, Cadd, Cindate, Coutdate, Room no, Room rent, Food_bill, Laudry_bil
mycursor.execute(cotm, datal)
mycursor.execute(rec, data2)
db.commit()
mycursor.close())
def display():
print("\n")
mycursor db.cursor()
h.Ccode c.Ccode")
mycursor.execute(qry)
for (Ccode, Cname, Cadd, Cindate, Coutdate, Room_no, CNationality, Ccontact_no, Cid_type, Cid_no) in
mycursor:
print("\n")
print("Customer details.......")
print("Customer code:",Ccode)
print("
mycursor.close()
db.close()
elif (d='2'):
h.Ccode-is")
rec_code=(Ccode,)
mycursor.execute(gry, rec_code)
rec_count=0
for (Ccode, Cname, Cadd, Cindate, Coutdate, Room_no, CNationality, Ccontact_no, Cid_type ,Cid_no) in
mycursor:
rec_count+-1
print("\nRecord Found......")
if (rec_count=0):
db.commit()
mycursor.close()
db.close()
else:
SEARCH CUSTOMER
def search():
mycursor-db.cursor()
mycursor.execute(qry, rec_srch)
rec_count=0
for (Ccode, Cname, Cadd, Cindate, Coutdate, Room_no, Room rent, Food_bill, Laudry_bill,G ane bill,
SubTotal bill, Add_charges, GrandTotal_bill) in mycursor:
rec_count+1
print("\nRecord Found')
if (rec_count==0):
db.commit()
mycursor.close()
DELETE CUSTOMER
def delete():
mycursor-db.cursor()
Ccode-input("\nEnter Customer Code to be delete from Hotel :") qry" (delete from hoteldata where
Coode-1') qryl-('delete from customer where Ccode-is')
del_rec =(Ccode,)
mycursor.execute(qry,del_rec) mycursor.execute(qryl, del_rec)
rec_count=0 db.close()
rec_count+=1
print("\nRecord Deleted......")
if rec_count--0:
db.commit()
mycursor.close() db.close()
UPDATE CUSTOMER
def update():
print("1.Customer Name:")
mycursor-db.cursor()
Data=(Cname, Ccode)
mycursor.execute(q, data)
data=(Cname, Ccode)
mycursor.execute(g, data)
print("\nRecord Updated.....!)
db.commit()
mycursor.close()
db.close()
elif (c--2):
e-HOTEL MANAGEMENT')
mycursor-db.cursor()
mycursor.execute(q, data)
mycursor.execute(q, data)
print("\nRecord Updated.....')
db.commit()
mycursor.close()
db.close()
elif (c-3):
mycursor-db.cursor()
Ccode=int (input("\nEnter Code of Customer to be Updated:')) qry-('select from hoteldata where Ccode-
in!)
data=(Cindate, Ccode)
mycursor.execute(q, data)
mycursor.execute(q, data)
print("\nRecord Updated.....')
db.commit()
mycursor.close()
db.close()
elif (c=-4):
e-HOTEL MANAGEMENT)
mycursor-db.cursor()
Ccode-int (input('\nEnter Code of Customer to be Updated:')) qry('select from hoteldata where Ccode-
is')
Coutdate-input("Enter Customer out Date:") q('update hoteldata set Coutdate-is where Ccode-s')
mycursor.execute(q, data)
print('\nRecord Updated.....')
db.commit() mycursor.close()
db.close()
elif (c=-5):
mycursor-db.cursor()
mycursor.execute(q, data)
print("\nRecord Updated.....')