Professional Documents
Culture Documents
Prabhat Cs
Prabhat Cs
Class: 12
Sec: A(Science)
Roll no.:
CERTIFICATE
This is to certify that this bonafide project work in the subject
Computer Science has been done by Pravat kumar dalai of Class 12
Science in the academic year 2019-20 and submitted to AISSCE
Practical Examination conducted by CBSE at KENDRIYA
VIDYALAYA GOPALPUR MILITARY STATION.
INTERNAL EXAMINER
EXTERNAL EXAMINER
PRINCIPAL
ACKNOWLEDGEMENT
4. CODE
5. OUTPUT SCREENSHOTS
6. CONCLUSION
8. BIBLIOGRAPHY
INTRODUCTION
This project on “HOTEL MANAGEMENT SYSTEM” is the
automation of the management process of a hotel. The system is able
to provide information such as hotel room information, hotel services,
bills etc. The system also enables the passenger to book their rooms,
pay the price on the spot.
For data storage and retrieval, I used the interface of Python with SQL
which enables to store data in the form of tables in SQL.
Every possible care has been taken to make the software and the
report clear, simple and error free which makes it special.
To reduce cost.
CODE
import mysql.connector
global z
mydb = mysql.connector.connect(user='root',
password='root',host='localhost')
mycursor=mydb.cursor()
print("________________________________________________________________
__________________________________________")
print(" WELCOME TO")
print(" PRAVAT INTERNATIONAL")
print("________________________________________________________________
__________________________________________")
while True:
def registercust():
L=[]
name=input("ENTER YOUR NAME:")
L.append(name)
addr=input("ENTER YOUR ADDRESS:")
L.append(addr)
indate=input("ENTER YOUR CHECK IN DATE:")
L.append(indate)
outdate=input("ENTER YOUR CHECK OUT DATE:")
L.append(outdate)
cust=(L)
sql="insert into
custdata(custname,addr,indate,outdate)values(%s,%s,%s,%s)"
mycursor.execute(sql,cust)
mydb.commit()
print("THANK YOU")
def roomtypeview():
sql="select * from roomtype"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
print("THANK YOU")
def roomrent():
print ("WE HAVE FOLLOWING ROOMS FOR YOU:-")
print ("TYPE A---->Rs. 1000 PN\-----[1]")
print ("TYPE B---->Rs. 2000 PN\-----[2]")
print ("TYPE C---->Rs. 3000 PN\-----[3]")
print ("TYPE D---->Rs. 4000 PN\-----[4]")
x=int(input("ENTER YOUR CHOICE PLEASE->"))
n=int(input("For HOW MANY NIGHTS DO YOU WANT TO STAY:"))
if(x==1):
print ("YOU HAVE OPTED FOR ROOM TYPE A")
s=1000*n
elif (x==2):
print ("YOU HAVE OPTED FOR ROOM TYPE B")
s=2000*n
elif (x==3):
print ("YOU HAVE OPTED FOR ROOM TYPE C")
s=3000*n
elif (x==4):
print ("YOU HAVE OPTED FOR ROOM TYPE D")
s=4000*n
else:
print ("PLEASE CHOOSE YOUR ROOM")
print ("YOUR ROOM RENT IS =",s,"\n")
import getpass
print(" PAYMENT")
print("YOU WANT TO PAY WITH:")
print("1. DEBIT CARD")
print("2. CREDIT CARD")
ctype=input("ENTER CARD TYPE (1/2):")
card=input("ENTER YOUR CARD NO.:")
passwd=input("ENTER YOUR PASSWORD:")
print("CONNECTING...")
print("PAYMENT SUCCESSFUL")
print("________________________________________________________________
__________________")
mycursor.execute("select now()")
N=mycursor.fetchall()
N=N[0][0]
N=str(N).split()
print(" _BILL_")
print("YOUR ACCOUNT IS DEBITED WITH Rs.",s,"ON",N[0],"AT",N[1])
print("THANK YOU")
def restaurantmenuview():
sql="select * from restaurant"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
print("THANK YOU")
def orderitem():
global s
sql="select * from restaurant"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
d=int(input("ENTER YOUR CHOICE:"))
if(d==1):
print("YOU HAVE ORDERED FOR TEA")
a=int(input("ENTER QUANTITY:"))
s=10*a
print("YOUR AMOUNT FOR TEA IS : Rs.",s,"\n")
elif (d==2):
print("YOU HAVE ORDERED FOR COFFEE")
a=int(input("ENTER QUANTITY:"))
s=10*a
print("your amount for coffee is : Rs.",s,"\n")
elif(d==3):
print("YOU HAVE ORDERED FOR COLD DRINK")
a=int(input("ENTER QUANTITY:"))
s=20*a
print("YOUR AMOUNT FOR COLD DRINK IS : Rs.",s,"\n")
elif(d==4):
print("YOU HAVE ORDERED FOR SAMOSA")
a=int(input("ENTER QUANTITY:"))
s=10*a
print("YOUR AMOUNT FOR SAMOSA IS : Rs.",s,"\n")
elif(d==5):
print("YOU HAVE ORDERED FOR SANDWICH")
a=int(input("ENTER QUANTITY:"))
s=50*a
print("YOUR AMOUNT FOR SANDWICH IS : Rs.",s,"\n")
elif(d==6):
print("YOU HAVE ORDERED FOR DOSA")
a=int(input("ENTER QUANTITY:"))
s=30*a
print("YOUR AMOUNT FOR DOSA IS : Rs.",s,"\n")
elif(d==7):
print("YOU HAVE ORDERED FOR VADA")
a=int(input("ENTER QUANTITY:"))
s=10*a
print("YOUR AMOUNT FOR VADA IS : Rs.",s,"\n")
elif(d==8):
print("YOU HAVE ORDERED FOR MILK")
a=int(input("ENTER QUANTITY:"))
s=20*a
print("YOUR AMOUNT FOR MILK IS : Rs.",s,"\n")
elif(d==9):
print("YOU HAVE ORDERED FOR NOODLES")
a=int(input("ENTER QUANTITY:"))
s=50*a
print("YOUR AMOUNT FOR NOODLES IS : Rs.",s,"\n")
elif(d==10):
print("YOU HAVE ORDERED FOR PASTA")
a=int(input("ENTER QUANTITY:"))
s=50*a
print("YOUR AMOUNT FOR PASTA IS : Rs.",s,"\n")
else:
print("PLEASE ENTER YOUR CHOICE FROM THE MENU")
print("THANK YOU")
def laundrybill():
global z
sql="select * from laundry"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
y=int(input("ENTER YOUR NUMBER OF CLOTHES :"))
z=y*10
print("YOUR LAUNDRY BILL : Rs.",z,"\n")
print("THANK YOU")
return z
def viewbill():
a=input("ENTER YOUR NAME :")
print("CUSTOMER NAME :",a,"\n")
print("LAUNDRY BILL :",z)
print("RESTAURANT BILL :",s)
print("TOTAL AMOUNT :",z+s)
print("THANK YOU")
def Menuset():
print("ENTER CUSTOMER DATA----------[1]")
print("VIEW ROOMTYPE----------------[2]")
print("BOOK A ROOM------------------[3]")
print("VIEW RESTAURANT MENU---------[4]")
print("ORDER FOOD-------------------[5]")
print("LAUNDRY----------------------[6]")
print("COMPLETE BILL----------------[7]")
print("EXIT-------------------------[8]")
Menuset()
try:
userinput=int(input("PLEASE SELECT AN ABOVE OPTION :"))
except ValueError:
continue
if(userinput==1):
registercust()
elif(userinput==2):
roomtypeview()
elif(userinput==3):
roomrent()
elif(userinput==4):
restaurantmenuview()
elif(userinput==5):
orderitem()
elif(userinput==6):
laundrybill()
elif(userinput==7):
viewbill()
elif(userinput==8):
break
else:
print("INVALID INPUT !!!")
print("PLEASE TRY AGAIN")
continue
ask=input("DO AGAIN? (Y/N):").upper()
if ask=='N':
break
print("THANKS")
print("WE HOPE YOU ENJOYED OUR SERVICES")
print("VISIT AGAIN")
print("________________________________________________________________
__________________________________________")
print(" PRAVAT INTERNATIONAL")
print("________________________________________________________________
__________________________________________")
mydb.close()
OUTPUT SCREENSHOTS
CONCLUSION
We can hereby conclude that:
The cost and benefit analysis shows that the system was quite
successful in saving costs and generate benefits.
https://www.python.org
https://www.mysql.com
https://pythontrends.wordpress.com