Project File CS (Hotel Management)
Project File CS (Hotel Management)
Project File
Computer Science(083)
Session-: 2024-25
HOTEL management
Submitted By-: Mayank Dev
Class-: 12th A
CERTIFICATE
This is to certify that Mayank Dev of Class: XII(A) of
Pt.Deen Dayal Upadhyaya Sanatan Dharm
Vidyalaya, Nawabganj, Kanpur has done his
project on Hotel Management under my
supervision during session 2024-25. He has taken
interest and has shown at most sincerity in
completion of this project. I certify this project up to
my expectation & as per guidelines issued by CBSE.
Principal
ACKNOWLEDGEMENT
It is with pleasure that I acknowledge my sincere
gratitude to our teacher, MR. Amit Gupta who
taught and undertook the responsibility of teaching
the subject Computer Science during Session 2024-
25. I have been greatly benefited from his classes. I
am especially indebted to our Principal MR. Rakesh
Ram Tripathi who has always been a source of
encouragement and support and without whose
inspiration this project would not have been a
successful I would like to place on record heartfelt
thanks to him.
Finally, I would like to express my sincere
appreciation for all the other students for my batch
their friendship & the fine time that we all shared
together.
HARDWARE AND SOFTWARES
REQUIRED
HARDWARES
1- Desktop Computer / Laptop
2- Mobile Phone
SOFTWARES
1- Python (Latest Version)
2- MySQL
TABLE OF CONTENTS
S.N TOPIC PAGE
o No.
1. Certificate 1
2. Acknowledge 2
3. Hardware and Software Required 3
4. Table of Content 4
5. Introduction 5
6. Python Source Code
7. MySQL Database
8. Outputs
9. Bibliography
HOTEL MANAGEMENT
A hotel is a commercial establishment that provides lodging,
accommodation, and other services to travelers or tourists.
Hotels typically offer a range of rooms or suites with varying
levels of amenities and services. These establishments can vary
widely in size and style, from small boutique hotels to large
luxury resorts.
import mysql.connector
from tabulate import tabulate
import random
a=mysql.connector.connect(host="localhost",user="root",password="ad
min",database="hotel_sunset")
y=a.cursor()
#cancel order
def corder():
a=mysql.connector.connect(host="localhost",user="root",password="a
dmin",database="hotel_sunset")
y=a.cursor()
x=int(input("enter your number:"))
s="delete from orders where Mobile_No={}".format(x)
y.execute(s)
print("\n\n","YOUR ORDER HAS BEEN CANCELLED")
print("YOU HAVE BEEN REDIRECTED TO THE MAIN PAGE","\n\n")
a.commit()
#feedback
def fdback():
a=mysql.connector.connect(host="localhost",user="root",password="ad
min",database="hotel_sunset")
y=a.cursor()
fdn=input("Enter your name:")
print("Write something about us...")
fdi=input()
x="insert into fdback values('{}','{}')".format(fdn,fdi)
y.execute(x)
print("\n\n")
print("THANKYOU FOR YOUR FEEDBACK")
print("\n")
print("YOU HAVE BEEN REDIRECTED TO THE MAIN PAGE")
a.commit()
#welcome
def start1():
while True:
print("\n")
print("1. VIEW MENU")
print("2. VIEW YOUR ORDERS")
print("3. CANCEL ORDER")
print("4. FEEDBACK")
print("5. EXIT")
ch1=int(input(" enter your choice:"))
if ch1==1:
menu()
elif ch1==2:
vorders()
elif ch1==3:
corder( )
elif ch1==4:
fdback()
elif ch1==5:
break
else:
print("\n","INVALID CHOICE"," \n" ,"TRY AGAIN."," \n")
start1()
#user choice
def bookings():
try:
a = mysql.connector.connect(host="localhost", user="root",
password="admin", database="hotel_sunset"
y = a.cursor()
z="select * from book_rooms"
y.execute(z)
x = y.fetchall()
columns = [i[0] for i in y.description]
print(tabulate(x, headers=columns, tablefmt="fancy_grid"))
roomchoice = int(input("Enter Your Option : "))
if roomchoice == 1:
book_delux_room()
elif roomchoice == 2:
book_double_room()
elif roomchoice == 3:
book_king_room()
elif roomchoice == 4:
book_balcony_room()
elif roomchoice == 5:
book_cavana()
else:
print("Sorry, May Be You Are Giving Me Wrong Input, Please Try
Again !!! ")
except:
print("Error")
finally:
y.close()
a.close()
#gaming section
def gaming():
print("1. Table Tennis -----> 15000 Rs./HR")
print("2. Bowling -----> 10000 Rs./HR")
print("3. Snooker -----> 25000Rs./HR")
print("4. VR World Gaming -----> 40000 Rs./HR")
print("5. Video Games -----> 35000 Rs./HR")
print("6. Swimming Pool Games -----> 50000Rs./HR")
print("7. Exit")
game=int(input("Enter What Game You Want To Play : "))
hour=int(input("Enter No Of Hours You Want To Play : "))
if game==1:
#for admin
def admin_slot():
while True:
print("*********WELCOME ADMIN*********")
print("1.Employees Details")
print("2.Coustomer Details")
print("3.Room Details")
print("4.Feedback")
print("5.Restaurant Details")
print("6.Exit")
a=int(input("enter your choice"))
if a==1:
emp_details()
elif a==2:
customdet()
elif a==3:
room_details()
elif a==4:
fedback()
elif a==5:
restaurant_details()
elif a==6:
break
else:
print("\n\n","INVALID CHOICE","\n","TRY AGAIN")
#for customer
def customer_slot():
while True:
print("*************NAMASTE*************")
print("1.RESTAURANT")
print("2.BOOK ROOMS")
print("3.GAMING")
print("4.FEEDBACK")
print("5.EXIT")
a=int(input("enter your choice"))
if a==1:
restaurant()
elif a==2:
bookings()
elif a==3:
gaming()
elif a==4:
feedback()
elif a==5:
break
else:
print("\n\n","INVALID CHOICE")
#first interface
while True:
print("*********WELCOME TO HOTEL SUNSET*********")
print("1.admin")
print("2.customer")
print("3.exit")
a=int(input("who are you"))
if a==1:
def admin_login(a, username, password):
a=mysql.connector.connect(host="localhost",user="root",password="ad
min",database="hotel_sunset")
y=a.cursor()
try:
# Check if the provided username and password match an admin
record
query = "SELECT * FROM users WHERE username = %s AND password
= %s" y.execute(query, (username, password))
admin_result = y.fetchone()
if admin_result:
print("Login successful. Welcome, Admin!")
else:
print("Invalid username or password. Please try again.")
except Exception as e:
print(f"Error: {e}")
a.close()
admin_username = input("Enter Admin Username: ")
admin_password = input("Enter Admin Password: ")
admin_login(a, admin_username, admin_password)
admin_slot()
elif a==2:
customer_slot()
elif a==3:
break
MySQL
DATABASE
All Tables Used-:
2-Employees-:
3-Feedback-:
4-Menu-:
5-Orders-:
\
6-Rooms-:
7-Room Details-:
8-Users-:
OUTPUTS
View Order-:
Canceling an Order-:
Feedback of Restaurant-:
Book a Room-:
Gaming-:
Feedback of Hotel-: