Acknowledgement 1
Acknowledgement 1
ACKNOWLEDGEMEN
T
Apart from the efforts of me, the success of any project
depends largely on the encouragement and guidelines
of many others. I take this opportunity to express my
gratitude to the people who have been instrumental in
the successful completion of this project. I express my
heartfelt gratitude to my parents for constant
encouragement while carrying out this project. I would
like to express a deep sense of thanks & gratitude to
my guide MRS. ANITA SALUJA for guiding me
immensely through the course of the project.
Last but not the least I would like to thanks all those
who had helped directly and indirectly towards the
completion of this project.
Page | 2
CERTIFICATE
Certified that the work contained in the project titled
“HOTEL MANAGEMENT SYSTEM,” by: ANANT SHARMA
has been carried out under my supervision and that
this work has not been submitted elsewhere for a AISSE
certificate. Year 2024-2025
INDEX
1. Abstract…………………
2. Introduction…………………
3. Python Code…………………
4. Outputs…………………
5. Databases and Table
Structures….
6. Backend Data…………………
7. Conclusion…………………
8. Bibliography…………………
ABSTRACT
The Project HOTEL MANAGEMENT SYSTEM is a web-
based application that allows the hotel manager to
Page | 4
HOTEL MANAGEMENT
SYSTEM
INTRODUCTION
Hotel Management System deals with the maintenance
of a guest’s bill during one’ s stay at the hotel and
withal the allocation of rooms for them. It contains all
the basic functions which include entering customer’s
data, calculating room rent, restaurant bill, laundry bill,
game bill, and total cost. In this mini project, there is no
such login system. This means he can use all those
available features easily without any restriction. It is too
easy to use, he can check the total cost of staying in
the hotel easily with every single detail.
Talking about the features of this Simple Hotel
Management System, at first, the user must enter his
data. It includes the name of the user, address, check-
in, and check-out dates. The user can calculate room
rents. Inside this section, there are total four types of
room with different prices. After selecting the room
type, the system asks to enter the number of nights
spent to calculate room rent.
Page | 6
PYTHON CODE
def addCustomer():
global myConnection
if myConnection:
try:
cursor = myConnection.cursor()
cid = input("Enter Customer Identification Number: ")
name = input("Enter Customer Name: ")
age = input("Enter Customer's Age: ")
nationality = input("Enter Customer's Nationality: ")
phoneno = input("Enter Customer's Phone Number: ")
email = input("Enter Customer's Email: ")
sql = "INSERT INTO C_Details (cid, name, age, nationality,
phoneno, email) VALUES (%s, %s, %s, %s, %s, %s)"
values = (cid, name, age, nationality, phoneno, email)
cursor.execute(sql, values)
myConnection.commit()
print("\nNew Customer Entered In The System
Successfully")
finally:
cursor.close()
else:
print("Failed to connect to MySQL Server")
P a g e | 10
#BOOKING RECORD
def searchcustomer(cid):
global myConnection
if myConnection:
try:
cursor = myConnection.cursor()
sql = "SELECT * FROM C_Details WHERE cid = %s"
cursor.execute(sql, (cid,))
customer = cursor.fetchone()
P a g e | 11
cursor.close()
if customer:
print("Customer found")
return customer
else:
print("Customer not found")
return None
except mysql.connector.Error as err:
print(f"Error: {err}")
return None
else:
print("Failed to connect to MySQL Server")
return None
def bookingrecord(cid):
global myConnection
if searchcustomer(cid):
if myConnection:
try:
cursor = myConnection.cursor()
createTable = """CREATE TABLE IF NOT EXISTS
BOOKING_RECORD(
CID VARCHAR(20),
CHECK_IN DATE,
CHECK_OUT DATE
)"""
cursor.execute(createTable)
P a g e | 12
#ROOM RENT
def roomRent(cid):
global myConnection
global roomrent
if searchcustomer(cid):
if myConnection:
try:
cursor = myConnection.cursor()
createTable = """CREATE TABLE IF NOT EXISTS
ROOM_RENT(
CID VARCHAR(20),
ROOM_CHOICE INT,
NO_OF_DAYS INT,
ROOMNO INT,
ROOMRENT INT
)"""
cursor.execute(createTable)
print("\n#### We Have The Following Rooms For You
####")
P a g e | 14
finally:
cursor.close()
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION")
else:
print("\nCustomer not found")
#RESTAURENT BILLING
P a g e | 16
def Restaurent(cid):
global myConnection
global restaurentbill
if searchcustomer(cid):
if myConnection:
try:
cursor = myConnection.cursor()
createTable = """CREATE TABLE IF NOT EXISTS
RESTAURENT(
CID VARCHAR(20),
CUISINE VARCHAR(30),
QUANTITY VARCHAR(30),
BILL INT
)"""
cursor.execute(createTable)
print("""
1. Vegetarian Combo --> $350
2. Non-Vegetarian Combo --> $500
3. Snacks Combo --> $200
4. Veg and Non-Veg Combo --> $750
5. Veg+Non-Veg+Snacks --> $850
""")
cuisine_choice = int(input("Enter Your Choice: "))
quantity = int(input("Enter Quantity: "))
restaurentbill = 0
if cuisine_choice == 1:
restaurentbill = 350 * quantity + 85
elif cuisine_choice == 2:
P a g e | 17
finally:
cursor.close()
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION")
else:
print("\nCustomer not found")
P a g e | 18
#GAMING DETAILS
def Gaming(cid):
global myConnection
global gamingbill
if searchcustomer(cid):
if myConnection:
try:
cursor = myConnection.cursor()
createTable = """CREATE TABLE IF NOT EXISTS GAMING(
CID VARCHAR(20),
GAMES VARCHAR(30),
P a g e | 19
HOURS INT,
GAMING_BILL INT
)"""
cursor.execute(createTable)
while True:
print("""
1. PS5/PS4/Xbox -->$350
2. VR Games -->$450
3. Table Tennis -->$150
4. Bowling -->$100
5. Snooker -->$250
6. Swimming Pool Games -->$400""")
game_choice = int(input("Enter Your Choice: "))
hours = int(input("Enter Hours: "))
if game_choice == 1:
gamingbill += 350 * hours + 30
elif game_choice == 2:
gamingbill += 450 * hours + 30
elif game_choice == 3:
gamingbill += 150 * hours + 30
elif game_choice == 4:
gamingbill += 100 * hours + 30
elif game_choice == 5:
gamingbill += 250 * hours + 30
elif game_choice == 6:
gamingbill += 400 * hours + 30
else:
print("Invalid Game Choice")
P a g e | 20
continue
finally:
cursor.close()
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION")
else:
print("\nCustomer not found")
P a g e | 21
#SHOPPING
def Fashion(cid):
global myConnection
global fashionbill
if searchcustomer(cid):
if myConnection:
try:
cursor = myConnection.cursor()
createTable = """CREATE TABLE IF NOT EXISTS
FASHION(
CID VARCHAR(20),
ITEM VARCHAR(30),
QUANTITY VARCHAR(30),
FASHION_BILL INT
)"""
cursor.execute(createTable)
while True:
print("""
1. Shirts/T-Shirts -->$250
2. Pants -->$200
3. Jeans -->$400
4. Leather Jacket -->$700
5. Gown -->$300
6. Cosmetic Kit -->$300
P a g e | 22
7. Trousers -->$40
8.Footwear -->$80
9.Accessories -->$50
""")
item_choice = int(input("Enter Your Choice: "))
quantity = int(input("Enter Quantity: "))
if item_choice == 1:
fashionbill += 250 * quantity + 60
elif item_choice == 2:
fashionbill += 200 * quantity + 60
elif item_choice == 3:
fashionbill += 400 * quantity + 60
elif item_choice == 4:
fashionbill += 700 * quantity + 60
elif item_choice == 5:
fashionbill += 300 * quantity + 60
elif item_choice == 6:
fashionbill += 300 * quantity + 60
elif item_choice == 7:
fashionbill += 40 * quantity + 60
elif item_choice == 8:
fashionbill += 80 * quantity + 60
elif item_choice == 9:
fashionbill += 50 * quantity + 60
else:
print("Invalid Item Choice")
continue
P a g e | 23
finally:
cursor.close()
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION")
else:
print("\nCustomer not found")
#TOTAL AMOUNT
def totalamount(cid):
global roomrent, restaurentbill, fashionbill, gamingbill,
totalamount
if searchcustomer(cid):
P a g e | 24
print("____________________________________________________________
_")
print("\n\t\t\t****** CUSTOMER DETAILS ******")
customer_details = searchcustomer(cid)
if customer_details:
print(f"\nCustomer Name: {customer_details[1]}")
print(f"Customer Age: {customer_details[2]}")
print(f"Customer Nationality: {customer_details[3]}")
print(f"Customer Phone Number: {customer_details[4]}")
print(f"Customer Email: {customer_details[5]}")
print(f"\nRoom Rent: ${roomrent}")
print(f"Restaurant Bill: ${restaurentbill}")
print(f"Gaming Bill: ${gamingbill}")
print(f"Fashion Boutique Bill: ${fashionbill}")
print(f"Total Amount: ${totalamount}")
else:
print("\nCustomer not found")
#MAIN FUNCTION
if __name__ == "__main__":
myConnection = MYSQLconnectionCheck()
P a g e | 25
if myConnection:
while True:
print("""
1. Add Customer
2. Search Customer
3. Record Booking
4. Room Rent
5. Restaurant Bill
6. Gaming Bill
7. Fashion Boutique Bill
8. Total Bill
9. Exit""")
choice = int(input("Enter Your Choice: "))
if choice == 1:
addCustomer()
elif choice == 2:
cid = input("Enter Customer Identification Number: ")
searchcustomer(cid)
elif choice == 3:
cid = input("Enter Customer Identification Number: ")
bookingrecord(cid)
elif choice == 4:
cid = input("Enter Customer Identification Number: ")
roomRent(cid)
elif choice == 5:
cid = input("Enter Customer Identification Number: ")
Restaurent(cid)
elif choice == 6:
P a g e | 26
ROOM RENT
RESTAURENT BILL
P a g e | 29
P a g e | 30
GAMING BILL
P a g e | 31
SHOPPING BILL
P a g e | 32
TOTAL BILL
DATABASES:
TABLE STRUCTURE 7
#Customer Details
#Restaurent Bill
P a g e | 38
#Total Amount
CONCLUSION
HOTEL MANAGEMENT SYSTEM is a Web-portal
Development Company specializing in providing custom
solutions for small businesses. We Strive to build
solutions to your specific needs to get the job done
right the first time. We pay special attention to the ease
of use and utilize the latest in technology.
This system is developed for the exclusively for the
people. It provides facilities to the user with user
friendly modules with sub modules. This system is
developed in understandable approach which can be
easier to the layman of the computers. This system is
developed totally GUI based and with smart links.
BIBLIOGRAPHY
https://www.w3resource.com
https://en.wikipedia.org/wiki/
E_(mathematical_constant)
https://cbsetoday.com
https://www.academia.edu/