You are on page 1of 15

KENDRIYA VIDYALAYA

gopalpUR military station

Computer Science Project


2019-20
ON
HOTEL MANAGEMENT SYSTEM

Submitted by: Pravat Kumar Dalai

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

I express my profound sense of gratitude to my project guided


by Mr. Vishnu kumar mehera for his timely advice and
valuable guidance which enable me to complete my project in
time. I owe my sincere thanks to the honourable Principal
for the completion of the project. I also take this opportunity
to thanks the almighty and parents and to those who are
directly or indirectly involved in the successful completion of
my project.

The project was prepared as a part of requirement of AISSCE


2019-20.
CONTENTS
1. INTRODUCTION

2. ABOUT THE PROJECT

3. OBJECTIVE OF THE PROJECT

4. CODE

5. OUTPUT SCREENSHOTS

6. CONCLUSION

7. SCOPE OF THE PROJECT

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.

ABOUT THE PROJECT


The project named “HOTEL MANAGEMENT SYSTEM” is
written in Python. Python is an Object-Oriented Programming
language and is intended to be a more high level language and
programmer friendly than the C, C++, etc. languages.

Every possible care has been taken to make the software and the
report clear, simple and error free which makes it special.

OBJECTIVE OF THE PROJECT


 Provide some amount of automation in hotel management.

 To help hotels make their business efficient.

 To make booking of rooms easier and faster.

 To reduce cost.
CODE
import mysql.connector
global z

mydb = mysql.connector.connect(user='root',
password='root',host='localhost')
mycursor=mydb.cursor()

mycursor.execute("create database hotel")


mydb.commit()
mycursor.execute("use hotel")
mydb.commit()
mycursor.execute("create table custdata(custname char(10),addr
char(10),indate char(10),outdate char(10))")
mydb.commit()
mycursor.execute("create table roomtype(sno int(5),roomtype
char(10),rent int(10))")
mydb.commit()
mycursor.execute("insert into roomtype values(%s,'%s',%s)"%(1,'TYPE
A',1000))
mydb.commit()
mycursor.execute("insert into roomtype values(%s,'%s',%s)"%(2,'TYPE
B',2000))
mydb.commit()
mycursor.execute("insert into roomtype values(%s,'%s',%s)"%(3,'TYPE
C',3000))
mydb.commit()
mycursor.execute("insert into roomtype values(%s,'%s',%s)"%(4,'TYPE
D',4000))
mydb.commit()
mycursor.execute("create table restaurant(sno int(10),itemname
char(10),rate int(4))")
mydb.commit()
mycursor.execute("insert into restaurant
values(%s,'%s',%s)"%(1,"TEA",10))
mydb.commit()
mycursor.execute("insert into restaurant
values(%s,'%s',%s)"%(2,"COFFEE",10))
mydb.commit()
mycursor.execute("insert into restaurant values(%s,'%s',%s)"%(3,"COLD
DRINK",20))
mydb.commit()
mycursor.execute("insert into restaurant
values(%s,'%s',%s)"%(4,"SAMOSA",10))
mydb.commit()
mycursor.execute("insert into restaurant
values(%s,'%s',%s)"%(5,"SANDWICH",50))
mydb.commit()
mycursor.execute("insert into restaurant
values(%s,'%s',%s)"%(6,"DOSA",60))
mydb.commit()
mycursor.execute("insert into restaurant
values(%s,'%s',%s)"%(7,"VADA",10))
mydb.commit()
mycursor.execute("insert into restaurant
values(%s,'%s',%s)"%(8,"MILK",20))
mydb.commit()
mycursor.execute("insert into restaurant
values(%s,'%s',%s)"%(9,"NOODLES",50))
mydb.commit()
mycursor.execute("insert into restaurant
values(%s,'%s',%s)"%(10,"PASTA",50))
mydb.commit()
mycursor.execute("create table laundry(sno int(3),itemname
char(10),rate int(3))")
mydb.commit()
mycursor.execute("insert into laundry
values(%s,'%s',%s)"%(1,"SHIRT",10))
mydb.commit()
mycursor.execute("insert into laundry
values(%s,'%s',%s)"%(2,"PANT",10))
mydb.commit()
mycursor.execute("insert into laundry
values(%s,'%s',%s)"%(3,"SUIT",10))
mydb.commit()
mycursor.execute("insert into laundry
values(%s,'%s',%s)"%(4,"SAARI",10))
mydb.commit()

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 system effectively automated the functions involved in the


processes being handled manually before.

 The cost and benefit analysis shows that the system was quite
successful in saving costs and generate benefits.

 The system is secure and scalable.

 The system design has been done keeping user-friendliness and


efficiency in mind.

SCOPE OF THE PROJECT

Scope of the project is to replace the manual work of hotel


management with the new computerized system. User does not need
much training to use this software, as this software is very user
friendly and easy to use. It replaces all the paper work also. In this
software, we can store thousands of records. It replaces all the
calculation works also as it calculates and print the bills. Some
advantages are:

 If any invalid entry done by the users which is nature of human


being, it gives the error message to the users to enter valid input.
BIBLIOGRAPHY

 https://www.python.org

 https://www.mysql.com

 https://pythontrends.wordpress.com

 Computer Science with Python by Sumita Arora

 Python Essential Reference by David M. Beazley

 Learning Python by Mark Lutz

You might also like