Practical File IP
Practical File IP
Session -2022-23
Class – xii [commerce]
SUBMITTED BY SUBMITTED TO
Kasak Shriwas Mr. Navin Piplodiya
Certificate
1
This is to certify that Student of Class XII
[commerce] of THE NEW ERA PUBLIC SCHOOL, Indore
has completed a project work in the subject
Informatics Practices on the topic: HOTEL
MANAGEMENT in the session 2022-23.
ACKNOWLEDGEMENT
2
I extend my sincere thanks to my school THE NEW ERA
PUBLIC SCHOOL. Which provided me the opportunity to fulfill
my wish and achieve my goal.
3
Index
1. About Python 5–8
2. About STUDENT MANAGMENT 9 – 10
3. Source code 13 – 15
4. Output Screens 16 - 18
5. Reference 20 – 20
4
About Python
Python is one of those rare languages which can claim to be
both simple and powerful. You will find yourself pleasantly
surprised to see how easy it is to concentrate on the solution to the
problem rather than the syntax and structure of the language you
are programming in.
5
Features of Python programming language
6
4. Open Source: Python is a open source programming language.
7
The official introduction to Python is:
INTRODUCTION
8
Simple Hotel Management System project is written in Python. The project file contains a
python script (Hotelms.py). This is a simple console based system which is very easy to
understand and use. Talking about the system, 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/she can use all
those available features easily without any restriction. It is too easy to use, he/she can check
the total cost of staying in the hotel easily with each and every detail.
Talking about the features of this Simple Hotel Management System, at first, the user has to
enter his/her 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 in order to calculate room rent. This simple system also contains other functions such as
calculating restaurant, laundry and game bill. When the user selects to calculate restaurant bill,
the system displays a small menu. From there the user has to select foods and then it displays
the total restaurant bill. The other remaining features; calculating laundry and game bill also
follows the same procedure as of calculating restaurant bill.
Feature :-
At last, after all these calculations the user can know about their total cost of staying easily. In
this feature, the system provides his/her details, with the room number, room rent, food,
laundry and games bill. The total sum is displayed to the users with some additional charges.
This simple console based Hotel Management system provides the simplest management of
hotel service and transaction. In short, this projects mainly focus on adding and calculating
results. There’s no external database connection file used in this mini project to save user’s
data permanently.
9
Source Code:
class hotelfarecal:
def
_init_(self,rt='',s=0,p=0,r=0,t=0,a=1800,name='',address='
',cindate='',coutdate='',rno=101):
self.rt=rt
self.r=r
10
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):
def roomrent(self):#sel1353
11
print ("We have the following rooms for you:-")
if(x==1):
self.s=6000*n
elif (x==2):
self.s=5000*n
elif (x==3):
self.s=4000*n
12
elif (x==4):
self.s=3000*n
else:
def restaurentbill(self):
print("**RESTAURANT MENU**")
print("1.water----->Rs20","2.tea-----
>Rs10","3.breakfast combo--->Rs90","4.lunch----
>Rs110","5.dinner--->Rs150","6.Exit")
while (1):
if (c==1):
self.r=self.r+20*d
13
elif (c==2):
self.r=self.r+10*d
elif (c==3):
self.r=self.r+90*d
elif (c==4):
self.r=self.r+110*d
elif (c==5):
self.r=self.r+150*d
elif (c==6):
break;
else:
print("Invalid option")
14
print ("Total food Cost=Rs",self.r,"\n")
def laundrybill(self):
print ("1.Shorts----->Rs3","2.Trousers-----
>Rs4","3.Shirt--->Rs5","4.Jeans---->Rs6","5.Girlsuit---
>Rs8","6.Exit")
while (1):
if (e==1):
self.t=self.t+3*f
elif (e==2):
self.t=self.t+4*f
elif (e==3):
15
f=int(input("Enter the quantity:"))
self.t=self.t+5*f
elif (e==4):
self.t=self.t+6*f
elif (e==5):
self.t=self.t+8*f
elif (e==6):
break;
else:
def gamebill(self):
16
print ("1.Table tennis----->Rs60","2.Bowling-----
>Rs80","3.Snooker--->Rs70","4.Video games----
>Rs90","5.Pool--->Rs50==6","6.Exit")
while (1):
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):
17
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:
def display(self):
18
print ("Check out date",self.coutdate)
self.rt=self.s+self.t+self.p+self.r
self.rno+=1
def main():
a=hotelfarecal()
while (1):
print("2.Calculate rommrent")
19
print("3.Calculate restaurant bill")
print("5.Calculate gamebill")
print("7.EXIT")
if (b==1):
a.inputdata()
if (b==2):
a.roomrent()
if (b==3):
a.restaurentbill()
if (b==4):
a.laundrybill()
if (b==5):
a.gamebill()
20
if (b==6):
a.display()
if (b==7):
quit()
main()
*********************
OUTPUT
21
22
23
24
25
Reference
Informatics Practices -: Sultan Chand [ Preeti Arora]
26
Informatics Practices -: Sumita Arora
Web support - : Wikipedia and Other web blogs to create and this
project.
27