The Hotel Management System In Python has come a long way in assisting hoteliers in improving the way their businesses operate, and its revolutionary impact is undeniable.
A contemporary property management system can help you improve your company’s overall operations by streamlining administrative procedures and processes.
Importance of Hotel Management System In Python
The hotel management courses will build the groundwork for a successful career by exposing students to critical topics like as customer service, accounting, food and beverage services, and kitchen operations essentials.
System’s Beneficiaries
- Hotels
- Resorts
Project Details and Technology
Project Name: | Hotel Management System Project In Python With Source Code |
Abstract | A hotel management system in python is a set of hotel software solutions that keep operations flowing. |
Language/s Used: | Python (Console Based) |
Python version (Recommended): | 3.8 or 3.9 |
Database: | None |
Type: | Desktop Application |
Developer: | Source Code Hero |
Updates: | 0 |
About Hotel Management System
The Hotel Management System Project in Python is a generic software project that was created (using Python) to automate hotel operations and make them more efficient.
In this tutorial, I’ll show you how to make a project for a hotel management system.
It may execute the following procedures. A Hotel Management System Project It covers main aspects of hotel management. Hotel Reservations, Hotel Room Information, Room Service, Billing, and Record-Keeping
This article provides a downloadable Python source code hotel management system that you may adapt to meet your client’s needs.
You don’t have to worry because I’ll walk you through the procedure step by step, especially when it comes to declaring variables and modules.
Major Functionalities Of The System
The major function of hotels is to provide travelers with shelter, food, refreshments, and other such services and goods on a commercial basis, providing items that are normally furnished in homes but are inaccessible to those traveling away from home.
Hotel Management System is an easy script that is created in Python programming language, This system teaches you how you can manage a hotel, restaurant, etc. So let’s begin:
This Script has 5 modules
- The first one is the main module which is used to control all the other modules given in the script.
- Second one is the “Customer Information” module which displayes the data or the information of the customer.
- Third one is the “Food Purchased” module which displayes the list of food items that was ordered by the customer.
- Fourth one is the “Room Rent” module which displayes the type of room is to rent by the customer .
- Fifth and the last one is the “Hotel Bill” module which is this module displayed the total purchased of the customer.
This Hotel Management System in Python Using GUI also includes a downloadable Project With Source Code for free, just find the downloadable source code below and click to start downloading.
By the way, if you are new to Python programming and don’t have any idea what Python IDE to use, I have here a list of the Best Python IDE for Windows, Linux, and Mac OS for you.
Additionally, I also have here How to Download and Install the Latest Version of Python on Windows.
To start executing a Hotel Management System Project With Source Code, make sure that you have installed Python on your computer.
Steps On How To Run The Project
Time needed: 5 minutes
These are the steps on how to run a Hotel Management System Project In Python With Source Code
- Download Source Code
First, find the downloadable source code below and click to start downloading the source code file.
- Extract File
Next, after finished to download the file, go to the file location and right-click the file and click extract.
- Open PyCharm
Next, open pycharm IDE and open the project you’ve downloaded.
- Run Project
Next, go to the Pycharm and click the run button to start executing the project.
Code Explanations
Here are the step-by-step code explanations of the hotel management system project in python.
1. Declaration of Variables
Code:
def __init__(self,rt='',s=0,p=0,r=0,t=0,a=1000,name='',address='',cindate='',coutdate='',rno=1):
print ("\n\n*****WELCOME TO HOTEl DE SUAREZ*****\n")
self.rt=rt
self.r=r
self.t=t
self.p=p
self.s=s
self.a=a
self.name=name
self.address=address
self.cindate=cindate
self.coutdate=coutdate
self.rno=rno
Explanation:
The code given above is the declared variables to be called in different functions of the system.
2. Input Data Method
Code:
def inputdata(self):
self.name=input("\nEnter your Fullname:")
self.address=input("\nEnter your address:")
self.cindate=input("\nEnter your check in date:")
self.coutdate=input("\nEnter your checkout date:")
print("Your room no.:",self.rno,"\n")
Explanation:
The code given above is the method for the customer input details.
Output:
3. Room Rent Method
Code:
def roomrent(self):#sel1353
print ("We have the following rooms for you:-")
print ("1. Class A---->4000")
print ("2. Class B---->3000")
print ("3. Class C---->2000")
print ("4. Class D---->1000")
x=int(input("Enter the number of your choice Please->"))
n=int(input("For How Many Nights Did You Stay:"))
if(x==1):
print ("you have choose room Class A")
self.s=4000*n
elif (x==2):
print ("you have choose room Class B")
self.s=3000*n
elif (x==3):
print ("you have choose room Class C")
self.s=2000*n
elif (x==4):
print ("you have choose room Class D")
self.s=1000*n
else:
print ("please choose a room")
print ("your choosen room rent is =",self.s,"\n")
Explanation:
The code given above is the method for room rent transactions, which displays all rooms and their prices from the hotel.
Output:
4. Restaurant Menu Method
Code:
def foodpurchased(self):
print("*****RESTAURANT MENU*****")
print("1.Dessert----->100","2.Drinks----->50","3.Breakfast--->90","4.Lunch---->110","5.Dinner--->150","6.Exit")
while (1):
c=int(input("Enter the number of your choice:"))
if (c==1):
d=int(input("Enter the quantity:"))
self.r=self.r+100*d
elif (c==2):
d=int(input("Enter the quantity:"))
self.r=self.r+50*d
elif (c==3):
d=int(input("Enter the quantity:"))
self.r=self.r+90*d
elif (c==4):
d=int(input("Enter the quantity:"))
self.r=self.r+110*d
elif (c==5):
d=int(input("Enter the quantity:"))
self.r=self.r+150*d
elif (c==6):
break;
else:
print("You've Enter an Invalid Key")
print ("Total food Cost=Rs",self.r,"\n")
Explanation:
The code given above is the method for the restaurant menu, that displays all the menus from the hotel restaurant.
Output:
5. Billing Method
Code:
def display(self):
print ("******HOTEL BILL******")
print ("Customer details:")
print ("Customer name:",self.name)
print ("Customer address:",self.address)
print ("Check in date:",self.cindate)
print ("Check out date",self.coutdate)
print ("Room no.",self.rno)
print ("Your Room rent is:",self.s)
print ("Your Food bill is:",self.r)
self.rt=self.s+self.t+self.p+self.r
print ("Your sub total Purchased is:",self.rt)
print ("Additional Service Charges is",self.a)
print ("Your grandtotal Purchased is:",self.rt+self.a,"\n")
self.rno+=1
Explanation:
The code given above is the method for the billing system, that displays the customer bill.
Output:
6. Main Function
Code:
def main():
a=hotelmanage()
while (1):
print("1.Enter Customer Data")
print("2.Calculate Room Rent")
print("3.Calculate Food Purchased")
print("4.Show total cost")
print("5.EXIT")
b=int(input("\nEnter the number of your choice:"))
if (b==1):
a.inputdata()
if (b==2):
a.roomrent()
if (b==3):
a.foodpurchased()
if (b==4):
a.display()
if (b==5):
quit()
main()
Explanation:
The code given above is the main function of the system, that includes the functions of all the methods.
Output:
Complete and Runnable Source Code
class hotelmanage:
def __init__(self,rt='',s=0,p=0,r=0,t=0,a=1000,name='',address='',cindate='',coutdate='',rno=1):
print ("\n\n*****WELCOME TO HOTEl DE SUAREZ*****\n")
self.rt=rt
self.r=r
self.t=t
self.p=p
self.s=s
self.a=a
self.name=name
self.address=address
self.cindate=cindate
self.coutdate=coutdate
self.rno=rno
def inputdata(self):
self.name=input("\nEnter your Fullname:")
self.address=input("\nEnter your address:")
self.cindate=input("\nEnter your check in date:")
self.coutdate=input("\nEnter your checkout date:")
print("Your room no.:",self.rno,"\n")
def roomrent(self):#sel1353
print ("We have the following rooms for you:-")
print ("1. Class A---->4000")
print ("2. Class B---->3000")
print ("3. Class C---->2000")
print ("4. Class D---->1000")
x=int(input("Enter the number of your choice Please->"))
n=int(input("For How Many Nights Did You Stay:"))
if(x==1):
print ("you have choose room Class A")
self.s=4000*n
elif (x==2):
print ("you have choose room Class B")
self.s=3000*n
elif (x==3):
print ("you have choose room Class C")
self.s=2000*n
elif (x==4):
print ("you have choose room Class D")
self.s=1000*n
else:
print ("please choose a room")
print ("your choosen room rent is =",self.s,"\n")
def foodpurchased(self):
print("*****RESTAURANT MENU*****")
print("1.Dessert----->100","2.Drinks----->50","3.Breakfast--->90","4.Lunch---->110","5.Dinner--->150","6.Exit")
while (1):
c=int(input("Enter the number of your choice:"))
if (c==1):
d=int(input("Enter the quantity:"))
self.r=self.r+100*d
elif (c==2):
d=int(input("Enter the quantity:"))
self.r=self.r+50*d
elif (c==3):
d=int(input("Enter the quantity:"))
self.r=self.r+90*d
elif (c==4):
d=int(input("Enter the quantity:"))
self.r=self.r+110*d
elif (c==5):
d=int(input("Enter the quantity:"))
self.r=self.r+150*d
elif (c==6):
break;
else:
print("You've Enter an Invalid Key")
print ("Total food Cost=Rs",self.r,"\n")
def display(self):
print ("******HOTEL BILL******")
print ("Customer details:")
print ("Customer name:",self.name)
print ("Customer address:",self.address)
print ("Check in date:",self.cindate)
print ("Check out date",self.coutdate)
print ("Room no.",self.rno)
print ("Your Room rent is:",self.s)
print ("Your Food bill is:",self.r)
self.rt=self.s+self.t+self.p+self.r
print ("Your sub total Purchased is:",self.rt)
print ("Additional Service Charges is",self.a)
print ("Your grandtotal Purchased is:",self.rt+self.a,"\n")
self.rno+=1
def main():
a=hotelmanage()
while (1):
print("1.Enter Customer Data")
print("2.Calculate Room Rent")
print("3.Calculate Food Purchased")
print("4.Show total cost")
print("5.EXIT")
b=int(input("\nEnter the number of your choice:"))
if (b==1):
a.inputdata()
if (b==2):
a.roomrent()
if (b==3):
a.foodpurchased()
if (b==4):
a.display()
if (b==5):
quit()
main()
Download the Source Code below
Summary
Hotel Management System in Python is a system created in Python programming language, this system teaches you how to manage a hotel.
This article is a way to enhance and develop our skills and logic ideas which is important in practicing the Python programming language which is the most well-known and most usable programming language in many companies.
Inquiries
If you have any questions or suggestions about the Hotel Management System Project In Python With Source Code, please feel free to leave a comment below.
How Can I connect It to my Mysql Server Please Helip.