This is Hotel management System App in python using python shell
Welcome message:
****************************************
WELCOME QWERTY TO HOTEL
****************************************
App Menu options :
Enter Customer Data
Calculate room Rent
Calculate Restaurant Bill
Calculate Laundry Bill
Calculate Game Bill
Show Total cost
EXIT
Here is code:
class HotelManagementApp:
def __init__(self,rt='',s=0, p=0, r=0, t=0, a=1800,name='',address='',cindate='',coutdate='',rno=101):
print ("*****" * 8)
print (" " * 4,"WELCOME QWERTY TO HOTEL")
print ("*****" * 8)
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("Enter your name: ")
self.address = input("Enter your address: ")
self.cindate = input("Enter your check in date: ")
self.coutdate = input("Enter your checkout date: ")
print("Your room no.:",self.rno,"\n")
def roomRent(self):
print ("We have the following rooms for you:-")
print ("1. type A (Rs. 6000 Per Night)")
print ("2. type B (Rs. 5000 Per Night)")
print ("3. type C (Rs. 4000 Per Night)")
print ("4. type D (Rs. 3000 Per Night)")
x = int(input("Enter Room type : "))
n = int(input("For How Many Nights Did You Stay:"))
if(x == 1):
print ("you have opted room type A")
self.s = 6000 * n
elif (x==2):
print ("you have opted room type B")
self.s = 5000 * n
elif (x==3):
print ("you have opted room type C")
self.s = 4000 * n
elif (x==4):
print ("you have opted room type D")
self.s = 3000 * n
else:
print ("please choose a room")
print ("your room rent is =",self.s,"\n")
def restaurentBill(self):
print("*****RESTAURANT MENU*****")
print("1. Water (Rs 20) ","2. Tea (Rs 10) ","3. Breakfast combo (Rs 90) ", "4. Lunch (Rs 110)","5. Dinner (Rs 150)","6. Exit")
while (1):
c=int(input("Enter your choice:"))
if (c==1):
d=int(input("Enter the quantity:"))
self.r=self.r + 20 * d
elif (c==2):
d=int(input("Enter the quantity:"))
self.r=self.r+10 * 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("Invalid option")
print ("Total food Cost = Rs ",self.r,"\n")
def laundryBill(self):
print ("******LAUNDRY MENU*******")
print ("1. Shorts (Rs 3)","2. Trousers (Rs 4)","3. Shirt (Rs 5) ","4. Jeans (Rs 6)","5. Girlsuit (Rs 8)","6. Exit")
while (1):
e=int(input("Enter your choice:"))
if (e==1):
f=int(input("Enter the quantity:"))
self.t=self.t+3*f
elif (e==2):
f=int(input("Enter the quantity:"))
self.t=self.t+4*f
elif (e==3):
f=int(input("Enter the quantity:"))
self.t=self.t+5*f
elif (e==4):
f=int(input("Enter the quantity:"))
self.t=self.t+6*f
elif (e==5):
f=int(input("Enter the quantity:"))
self.t=self.t+8*f
elif (e==6):
break;
else:
print ("Invalid option")
print ("Total Laundary Cost=Rs",self.t,"\n")
def gameBill(self):
print ("******GAME MENU*******")
print ("1.Table tennis (Rs 60) ","2. Bowling (Rs 80) ","3. Snooker (Rs 70) ","4. Video games ( Rs 90) ","5. Pool (Rs 50)","6. Exit")
while (1):
g=int(input("Enter your choice:"))
if (g==1):
h=int(input("No. of hours:"))
self.p=self.p+60*h
elif (g==2):
h=int(input("No. of hours:"))
self.p=self.p+80*h
elif (g==3):
h=int(input("No. of hours:"))
self.p=self.p+70*h
elif (g==4):
h=int(input("No. of hours:"))
self.p=self.p+90*h
elif (g==5):
h=int(input("No. of hours:"))
self.p=self.p+50*h
elif (g==6):
break;
else:
print ("Invalid option")
print ("Total Game Bill=Rs",self.p,"\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)
print ("Your laundary bill is:",self.t)
print ("Your Game bill is:",self.p)
self.rt=self.s+self.t+self.p+self.r
print ("Your sub total bill is:",self.rt)
print ("Additional Service Charges is",self.a)
print ("Your grandtotal bill is:",self.rt+self.a,"\n")
self.rno+=1
def main():
app = HotelManagementApp()
while True:
print("1. Enter Customer Data")
print("2. Calculate room Rent")
print("3. Calculate Restaurant Bill")
print("4. Calculate Laundry Bill")
print("5. Calculate Game Bill")
print("6. Show Total cost")
print("7. EXIT")
b = int(input("Enter your choice:"))
if (b == 1):
app.inputData()
if (b == 2):
app.roomRent()
if (b == 3):
app.restaurentBill()
if (b == 4):
app.laundryBill()
if (b == 5):
a.gameBill()
if (b == 6):
app.display()
if (b == 7):
quit()
main()
Download source code here: