Hotel Management System Project In Python With Source Code

What is a Hotel Management System Project In Python?

The Hotel Management System Project In Python is a general software developed (using Python) to simplify hotel operations by automating them.

In this tutorial, I will teach you how to Create a Hotel Management System Project In Python.

Hotel Management Software Project Information

Project Name:Hotel Management System Project in Python
Language/s Used:Python Console Based
Python version (Recommended):2.x or 3.x
Database:None
Type:Python App
Developer:IT SOURCECODE
Updates:0
Hotel Management System In Python – Project Information

Features of Hotel Management Python Project

Hotel Management Python Project It covers major aspects of hotel management, it could perform the following operations. 

Hotel Booking, Provides you with Hotel Rooms InfoRoom ServiceBilling, and Record-Keeping.

1. Hotel Booking

  • Function to book a room in a hotel by entering information about the user or customer.

2. Room Management

  • This feature manages all the information about the rooms in the hotel.

3. Room Services

  • The function the user has to select and give users and customers information about hotel rooms (i.e. about room amenities).

4. Billing and Record-Keeping

  • At check-out, there is a function that lets you pay for your hotel room and calculate your restaurant bill.
  • Use this function to keep track of who has stayed at the hotel and calculate room rent.

This tutorial includes the downloadable hotel management system in Python source code where in you modify it to fit your client requirements.

You don’t have to worry because I will expect that I will guide you to the step-by-step process especially, in declaring it variables and modules.

To start creating this Simple Hotel Management System Project In Python, make sure you have PyCharm IDE and installed Python in your computer.

Steps on how to create a Hotel Management System Project In Python With Source Code

Time needed: 5 minutes

Hotel Management System Project In Python With Source Code

  • Step 1: Create a Project Name.

    First step open the PyCharm IDE and click “File” and select “New Project” and then create a project name after that click the “create” button.
    create project in hotel management system project in python

  • Step 2: Create a Python File.

    Second step after creating a project name, “right” click the project name and the click “New” after that choose “Python File“.
    create python file in hotel management system project in python

  • Step 3: Name the Python File.

    Third step after choose Python File name the file “Hotel Management System” and then click “Enter“.

  • Step 4: The actual code.

    Now you can start coding, you are free to copy the code that being provided below.

Hotel Management Python Code Explanations

1. Class Declaration, Module and Variables

The code given below, which declaring the class , module and its variable.

You are free to copy and paste this code on your Python File.

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

2. Customer Information

This module ask the system to the user to enter the data or information of the customer.

    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")

3. Room Rent

This module displayed the type of rooms that you want to choose and their specific price.

    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")

4. Food Module

In this module displayed the list of foods and thier specific price to be order by the customer.

    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")

5. Billing Module

In this module displayed the total purchased of the customer.

 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

6. Main Module of the System

In this module displayed the main module of the system that can control all the module of the system.

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()

7. Complete Source Code of Hotel Management System Project Python

You are free to copy and execute this Hotel Management System Project Python to your computer.

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()

Downloadable Source Code Below

Anyway, if you want to level up your programming knowledge, especially Python, try this new article I’ve made for you Best Python Projects with source code for Beginners.

Also, I have here the Complete Python Tutorials for Beginners, I hope this can help you a lot.

But If you’re going to focus on web development using Django, you can download here from our list of Best Django Projects with source code based on real-world projects.

Summary

Hotel Management System is a system that is created in Python programming language, this system teaches you how to manage a hotel.

This system has 5 modules, The first is the main module which is can control all the modules that given. Second is the customer information module which displays the data or the information of the customer.

Third is the food purchased module which displays the list of foods that want to order by the customer, fourth is the room rent module which displays the type of room wants to rent by the customer.

And last is the hotel bill module which is this module displays the total purchased by the customer.

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.

Hotel Management System Project Using Different Programming Languages

Inquiries

If you have any questions or suggestions about the Hotel Management System project in Python, please feel free to leave a comment below.

2 thoughts on “Hotel Management System Project In Python With Source Code”

Leave a Comment