Python
Python
Submitted by
Narayana Devu
Sowmya Tupakula
SRM University–AP
Neerukonda, Mangalagiri, Guntur
Date: 6-Dec-22
This is to certify that the work present in this Project entitled “Hotel management”
has been carried out by Narayana Devu under my/our supervision. The work is
genuine, original, and suitable for submission to the SRM University – AP for the
award of Bachelor of Technology/Master of Technology in School of Engineering
and Sciences.
Supervisor
(Signature)
Lecturer,
i
Acknowledgements
ii
Table of Contents
Certificate .................................................................................................................................................................... i
Acknowledgements..............................................................................................................ii
Table of Content ................................................................................................................. iii
Abstract ............................................................................................................................... iv
Introduction… .................................................................................................................. v
Conclusion........................................................................................................................... 3
iii
Abstract
iv
Introduction
The hotel Management is a system that provides us to reserving rooms, check
whether the rooms are vacant are or not by using online browsing. This system is
very useful to all especially for business people. For Business people they don't have
sufficient time for these then they can use these type of online Hotel Management
Systems. By this project we will reduce the faults in bills of their expenditure and
decrease time of delay to give the bills to the customers. By this project we can also
include all the taxes on the bills according to their expenditures. It has a scope to
reduce the errors in making the bills. Computerized bill can be printed within
fraction of seconds. Online ordering of Booking is possible by using this software.
v
List of Tables
Flow Chart
vi
Objective
vii
Source Code
import time
import os
def calculate_daysbetween(start_day:str,end_day:str):
s_day = date(s_day[2],s_day[1],s_day[0])
e_day = date(e_day[2],e_day[1],e_day[0])
return difference.days
class Customer:
coupons =
("XX0Y13","XX0Z14","XX0G15","XXZ985","XXU73","XZ999YT","BGA597Y","OO9032",
"UT750087","RT8UPP64")
discount_coupons = ("XX0Y13","XX0Z14","XX0G15","OO9032","UT750087")
self.name = name
self.address = address
self.cin_date = cin_date
self.cout_date = cout_date
self.room_no = room_no
self.room_rent = room_rent
self.restaurant_bill = restaurant_bill
viii
self.restaurant_bills = []
self.laundry_bill = laundry_bill
self.laundry_bills = []
self.game_bill = game_bill
self.game_bills = []
self.additional_charges = a
self.total_cost = 0
self.coupon = ""
self.coupon_count = 0
self.discount = False
def enter_data(self):
x = ""
self.name = x
self.cin_date = x
self.cout_date = x
self.roomrent()
def roomrent(self):
print("| |")
print("| 1. A1 Class Room ---- >Rs 6000 PN\- |")
ix
print("| 2. A Class Room----- >rs 5000 PN\- |")
print("| |")
print("=========================================")
if(x == 1):
n = calculate_daysbetween(self.cin_date,self.cout_date)
self.room_rent = 6000*n
elif(x == 2):
n = calculate_daysbetween(self.cin_date,self.cout_date)
self.room_rent = 5000*n
elif(x == 3):
n = calculate_daysbetween(self.cin_date,self.cout_date)
self.room_rent = 4000*n
elif(x == 4):
n = calculate_daysbetween(self.cin_date,self.cout_date)
self.room_rent = 3000*n
else:
def restaurantbill(self):
x
os.system('cls')
print("===================================")
for i in items:
print("===================================")
print()
items_selected = {1:[0,False],2:[0,False],3:[0,False],4:[0,False],5:[0,False]}
while (1):
print(f"\nItem: {items[choice][0]}")
items_selected[choice][0] += q
items_selected[choice][1] = True
if q == 1:
else:
for i in range(4):
for j in range(i):
print(".",end="")
time.sleep(1)
print()
xi
break
else:
print("INVALID OPTION")
os.system('cls')
amount = 0
if(items_selected[item][1]== True):
print("==============================================")
self.restaurant_bill += amount
print("==============================================\n")
if len(self.restaurant_bills) != 0:
bill_no = 1
print("\n======================================")
print("======================================\n")
bill_no = bill_no + 1
self.restaurant_bills.append(amount)
x = input("Press Enter...")
def laundrybill(self):
os.system('cls')
xii
cloths = {1:["Shorts",3],2:["Trousers",4],3:["Shirts",5],4:["Jeans",6],5:["Girl suit",8]}
print("=================================")
for i in cloths:
print("=================================")
print()
cloths_selected = {1:[0,False],2:[0,False],3:[0,False],4:[0,False],5:[0,False]}
while (1):
print(f"\nCloth: {cloths[choice][0]}")
cloths_selected[choice][0] += q
cloths_selected[choice][1] = True
if q == 1:
else:
elif choice == 6:
for i in range(4):
for j in range(i):
print(".",end="")
time.sleep(1)
print()
break
else:
xiii
print("INVALID OPTION")
os.system('cls')
amount = 0
print("==============================================")
print("==============================================")
self.laundry_bill += amount
print("==============================================\n")
if len(self.laundry_bills) != 0:
bill_no = 1
print("\n======================================")
print("======================================\n")
bill_no = bill_no + 1
self.laundry_bills.append(amount)
x = input("Press Enter...")
def gamebill(self):
os.system('cls')
xiv
sports = {1:["Table tennis",60],2:["Bowling",80],3:["Snooker",70],4:["Video
games",90],5:["Pool",50]}
print("=================================")
for i in sports:
print("=================================")
print()
sports_played = {1:[0,False],2:[0,False],3:[0,False],4:[0,False],5:[0,False]}
while (1):
if choice in sports:
print(f"\nSport: {sports[choice][0]}")
sports_played[choice][0] += q
sports_played[choice][1] = True
if q == 1:
else:
elif choice == 6:
for i in range(4):
for j in range(i):
print(".",end="")
time.sleep(1)
print()
break
xv
else:
print("INVALID OPTION")
os.system('cls')
amount = 0
print("==============================================")
if(sports_played[sport][1] == True):
print("==============================================")
self.game_bill = amount
if len(self.game_bills) != 0:
bill_no = 1
print("\n======================================")
print("======================================\n")
bill_no = bill_no + 1
self.gaming_bills.append(amount)
x = input("Press Enter...")
def play_coupongame(self):
os.system('cls')
xvi
if self.coupon_count == 0:
self.coupon_count += 1
if self.coupon in self.discount_coupons:
self.discount = True
else:
else:
x = input("Press Enter...")
def display(self):
os.system('cls')
print("\n\n\t***********************************************")
print("\t*********** WELCOME TO ANDHRA HOTEL ***********")
print("\t***********************************************")
xvii
print("Your Food bill is :",self.restaurant_bill)
print("=================================================")
print("=================================================")
if self.discount == True:
self.room_no += 1
x = input("Press Enter...")
class HotelManagement:
self.customers = []
def add_person(self):
x = Customer()
x.enter_data()
self.customers.append(x)
def calculate_restaurantbill(self):
found = 0
xviii
for c in self.customers:
if c_name == c.name:
c.restaurantbill()
found = 1
if found == 0:
x = input("Press Enter...")
def calculate_laundrybill(self):
found = 0
if c_name == c.name:
c.laundrybill()
found = 1
if found == 0:
x = input("Press Enter...")
def calculate_gamebill(self):
found = 0
for c in self.customers:
if c_name == c.name:
c.gamebill()
found = 1
if found == 0:
xix
def calculate_totalcost(self):
found = 0
for c in self.customers:
if c_name == c.name:
c.display()
found = 1
if found == 0:
x = input("Press Enter...")
def show_coupon(self):
found = 0
for c in self.customers:
if c_name == c.name:
time.sleep(1)
c.play_coupongame()
found = 1
if found == 0:
x = input("Press Enter...")
def main():
a = HotelManagement()
xx
while (1):
os.system('cls')
print("\n\n\t***********************************************")
print("\t***********************************************")
print("\n=======================================")
print("4.Calculate gamebill")
print("5.Show coupon")
print("7.EXIT")
print("=======================================")
if (choice == 1):
a.add_person()
if (choice == 2):
a.calculate_restaurantbill()
if (choice == 3):
a.calculate_laundrybill()
if (choice == 4):
a.calculate_gamebill()
if (choice == 5):
a.show_coupon()
if (choice == 6):
xxi
a.calculate_totalcost()
if (choice == 7):
quit()
main()
xxii
List of Figures
Code:
xxiii
xxiv
xxv
xxvi
1
2
Conclusion:
References :
Websites reffered :
1.Google for problem solving
2.www.tutorialspoint.com
3.www.pythonprogramming.net
4.www.oracle.com
5.www.geeksforgeeks.com
6.www.w3schools.com