1
KENDRIYA VIDYALAYA THIRUVANNAMALAI
COMPUTER SCIENCE INVESTIGATORY PROJECT
SUbMITTED bY:-
S DHANUSH RAJ
CLASS xII (2021-22)
ROLL NO:-
2
TABLE OF CONTENTS
Certificate
Acknowledgement
Synopsis
System Requirements
Introduction
About Python & MySQL
Database Design
Coding
Outputs
Bibliography
3
Certificate
This is to certify that S DHANUSH RAJ of class XII
Science, Kendriya Vidyalaya Thiruvannamalai, have
successfully completed his project in computer science
practical for the AISSCE as prescribed by CBSE in the
year 2021-22.
Date :
Roll No. :
_____________________
Signature of Principal
___________________ ___________________
Signature of Internal Signature of External
Examiner Examiner
4
Acknowledgement
It would be my utmost pleasure to express my sincere
thanks to my Principal Dr. Reema Stella Jayachandran
madam for her valuable guidance and motivation. I
would also give my sincere thanks to my Computer
Science Teacher Mr. D K Jaiswal sir, for providing a
helping hand in this project. His valuable guidance,
support and supervision all through this project titled
“ Hotel Management System ” , are responsible for
attaining its present form. This project has been made
not only for fetching marks but also for knowledge.
Finally, I would like to thank CBSE for giving me this
opportunity to undertake this project.
____________________
(Signature of Student)
S DHANUSH RAJ
5
SYNOPSIS
The title of the project is “Hotel Management
System”. It works on different aspects and day to day
operations of a hotel. This project is written in
Python programming language. It can be executed
through software which supports the specific language
(like IDLE, CANOPY, ETC).
Hotel Management System deals with the
maintenance of a guest’s bill during one’s stay at the
hotel and withal the allocation of rooms for them. 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
6
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 follow the same
procedure as of calculating restaurant bill.
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 project mainly focuses on adding and
calculating results.
7
The main reason I chose this topic as my project is to
provide single platform for performing various kind
of operations of a hotel. To prepare this project we
will use basics of python modules and functions.
This perform will be containing GUI (graphical user
interface) named “TKINTER”. This will give the
graphical interface to the user and make a good look.
We have decided that this project should be easily
used by the user so it will be user friendly.
This project will be containing many functions for
doing particular tasks which are needed in the
program. We have planned to add more updates in
future to make it more efficient. We will try our best
to make the project good and satisfy the user.
8
SYSTEM REQUIREMENTS
HARDWARE REQUIRED
Printer, to print the required documents of the
project
Pen Drive
Processor : AMD
Ram : 4 GB
Hard Disk : 1 TB.
SOFTWARE REQUIRED
Operating system : Windows 10
Python 3.6.5 – IDLE
MySQL
MS Word, for presentation
9
INTRODUCTION
“Hotel Management System” is an application
developed for all devices where python is
downloaded. This project is designed in a versatile
manner such that it is compatible to provide different
options for the user in terms of logical and
mathematical operations.
Hotel Management System deals with the
maintenance of a guest’s bill during one’s stay at the
hotel and withal the allocation of rooms for them. 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
10
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 follow the same
procedure as of calculating restaurant bill.
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 project mainly focuses on adding and
calculating results.
EXISTING SYSTEM:
11
The current manual system uses paperwork and
direct human language communication by mouth to
manage the hotel. This delays information
transmission in the hotel. Booking is done through
phone calls or through visit to the hotel booking
office. The guest’s personal details such as Name,
Age, Nationality, and Duration of stay, are input
during booking in. The booking office orders for
preparation of the guest’s room before his/ her check
in date.
The documents are transferred manually to the filling
department for compilation of the guest’s file. On the
reporting date the file is transferred to the reception.
On checking in the guest is given the key to his
allocated room, he also specifies if he needs room
service.
The receptionist hands over the guest’s file to the
accountant on the next table. Here the guest pays
accommodation and meals fee. The guest’s file is
updated on daily basis of his expenditure costs. The
accounts department generates the bills on daily basis
and delivered to the guests in their rooms at dusk by
the service maids. The guest pays at the accounts
12
desk, where the receipts are generated. For a one
meal customer the bill is generated immediately after
ordering and he pays at the accountant desk before
leaving. During checking out of guests, their
expenditure outlines are generated a day before
check outdate. The guests receive their outlines at the
accounts desk as they check out, where they pay for
bills balances if any.
DISADVANTAGES OF EXISTING SYSTEM
 Guest files can easily get lost or mix up with
other guest file documents.
 Files occupy a large storage space.
 Unnecessary duplication of data.
 Files are prone to theft unauthorized
modification due to low data security levels and
standards.
 Due to easy access to guest data by
unauthorized users, guest data is extremely
unconfident.
 Retrieval of guest records is extremely
difficult.
 Data entry procedure is prone to errors.
13
 Guest records are extremely difficult to
modify since modification generates dirty and
unpresentable reports.
PROPOSED SYSTEM:
In our proposed system, we have the provision
for adding details and requirements of the
customer by themselves. So the overhead of the
hotel management and the employees becomes
less. The customer can use all those available
features easily without any restriction. It is too
easy to use; the customer can check the total cost
of staying in the hotel easily with each and every
detail. It also manages the bill of the customer
felicitously without any mismatches.
ADVANTAGES OF PROPOSED SYSTEM
The system enables easy and fast access to
the guest files.
The system provides better data management
facilities.
14
The system provides security measures to
access to the hotel’s information lowering
data security threats.
Easy update of the guest records.
Reduction of data entry and processing
errors.
Greatly reduce paper use at the hotel.
15
ABOUT PYHTON & MySQL
Python is an interpreted language as python programs
are executed by an interpreter. Thus, Python
interpreter should be installed on the computer
system to write and run python programs. We have
also learnt that Python IDLE (Integrated
Development and Learning Environment) provides
two working modes interactive mode (popularly
known as python shell) and script mode.
SQL (Structured Query Language) is a standard
language for accessing and manipulating database.
SQL commands are used to create, transform and
retrieve information from Relational Database
Management System (RDMS) and to create an
interface between user and database. By using SQL
commands, one can search for any data, remove
rows, drop table etc.
16
Database Design
In the program we have sqlite3 function for using
database queries in the program. In this program
we have used database for Name of the person,
Gender, Age, Address, Contacts. Then this will
be stored in the database calling it in the function
of the database command. The users will be
asked their details to be filled. We have make
the program that no detail should be empty every
detail should be filled according to it.
TAbLE: Member
17
CODING
# HOTEL MANAGEMENT SYSTEM
class hotelfarecal:
def
__init__(self,rt='',s=0,p=0,r=0,t=0,a=1800,name='',
address='',cindate='',coutdate='',rno=101):
print ("nn*****WELCOME TO
HEWING HOTEL*****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
18
self.cindate=cindate
self.coutdate=coutdate
self.rno=rno
def inputdata(self):
self.name=input("nEnter your name:")
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. type A---->rs 6000 PN-")
print ("2. type B---->rs 5000 PN-")
19
print ("3. type C---->rs 4000 PN-")
print ("4. type D---->rs 3000 PN-")
x=int(input("Enter Your Choice Please->"))
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")
20
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----->Rs20","2.tea-----
>Rs10","3.breakfast combo--->Rs90","4.lunch----
>Rs110","5.dinner--->Rs150","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
21
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):
22
print("******LAUNDRY
MENU*******")
print ("1.Shorts----->Rs3","2.Trousers-----
>Rs4","3.Shirt--->Rs5","4.Jeans---->Rs6","5.Girlsuit-
-->Rs8","6.Exit")
while (1):
#brought to you by code-projects.org
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
23
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----->Rs60","2.Bowling---
-->Rs80","3.Snooker--->Rs70","4.Video games----
>Rs90","5.Pool--->Rs50==6","6.Exit")
24
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:"))
25
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)
26
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+=
def main():
a=hotelfarecal()
while (1):
print("1.Enter Customer Data")
print("2.Calculate rommrent")
27
print("3.Calculate restaurant bill")
print("4.Calculate laundry bill")
print("5.Calculate gamebill")
print("6.Show total cost")
print("7.EXIT")
b=int(input("nEnter your choice:"))
if (b==1):
a.inputdata()
if (b==2):
a.roomrent()
if (b==3):
a.restaurentbill()
if (b==4):
a.laundrybill()
if (b==5):
28
a.gamebill()
if (b==6):
a.display()
if (b==7):
quit()
main()
29
OUTPUTS
1.
30
2.
31
3.
32
4.
33
5.
34
6.
35
7.
36
8.
37
9.
38
BIBLIOGRAPHY
1. www. python.org
2. www.mysql.com
3. www.google.com
4. Computer Science with Python by
Preeti Arora.
5. Computer Science with Python by
Sumita Arora.

DHANUSH.pdf

  • 1.
    1 KENDRIYA VIDYALAYA THIRUVANNAMALAI COMPUTERSCIENCE INVESTIGATORY PROJECT SUbMITTED bY:- S DHANUSH RAJ CLASS xII (2021-22) ROLL NO:-
  • 2.
    2 TABLE OF CONTENTS Certificate Acknowledgement Synopsis SystemRequirements Introduction About Python & MySQL Database Design Coding Outputs Bibliography
  • 3.
    3 Certificate This is tocertify that S DHANUSH RAJ of class XII Science, Kendriya Vidyalaya Thiruvannamalai, have successfully completed his project in computer science practical for the AISSCE as prescribed by CBSE in the year 2021-22. Date : Roll No. : _____________________ Signature of Principal ___________________ ___________________ Signature of Internal Signature of External Examiner Examiner
  • 4.
    4 Acknowledgement It would bemy utmost pleasure to express my sincere thanks to my Principal Dr. Reema Stella Jayachandran madam for her valuable guidance and motivation. I would also give my sincere thanks to my Computer Science Teacher Mr. D K Jaiswal sir, for providing a helping hand in this project. His valuable guidance, support and supervision all through this project titled “ Hotel Management System ” , are responsible for attaining its present form. This project has been made not only for fetching marks but also for knowledge. Finally, I would like to thank CBSE for giving me this opportunity to undertake this project. ____________________ (Signature of Student) S DHANUSH RAJ
  • 5.
    5 SYNOPSIS The title ofthe project is “Hotel Management System”. It works on different aspects and day to day operations of a hotel. This project is written in Python programming language. It can be executed through software which supports the specific language (like IDLE, CANOPY, ETC). Hotel Management System deals with the maintenance of a guest’s bill during one’s stay at the hotel and withal the allocation of rooms for them. 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
  • 6.
    6 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 follow the same procedure as of calculating restaurant bill. 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 project mainly focuses on adding and calculating results.
  • 7.
    7 The main reasonI chose this topic as my project is to provide single platform for performing various kind of operations of a hotel. To prepare this project we will use basics of python modules and functions. This perform will be containing GUI (graphical user interface) named “TKINTER”. This will give the graphical interface to the user and make a good look. We have decided that this project should be easily used by the user so it will be user friendly. This project will be containing many functions for doing particular tasks which are needed in the program. We have planned to add more updates in future to make it more efficient. We will try our best to make the project good and satisfy the user.
  • 8.
    8 SYSTEM REQUIREMENTS HARDWARE REQUIRED Printer,to print the required documents of the project Pen Drive Processor : AMD Ram : 4 GB Hard Disk : 1 TB. SOFTWARE REQUIRED Operating system : Windows 10 Python 3.6.5 – IDLE MySQL MS Word, for presentation
  • 9.
    9 INTRODUCTION “Hotel Management System”is an application developed for all devices where python is downloaded. This project is designed in a versatile manner such that it is compatible to provide different options for the user in terms of logical and mathematical operations. Hotel Management System deals with the maintenance of a guest’s bill during one’s stay at the hotel and withal the allocation of rooms for them. 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
  • 10.
    10 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 follow the same procedure as of calculating restaurant bill. 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 project mainly focuses on adding and calculating results. EXISTING SYSTEM:
  • 11.
    11 The current manualsystem uses paperwork and direct human language communication by mouth to manage the hotel. This delays information transmission in the hotel. Booking is done through phone calls or through visit to the hotel booking office. The guest’s personal details such as Name, Age, Nationality, and Duration of stay, are input during booking in. The booking office orders for preparation of the guest’s room before his/ her check in date. The documents are transferred manually to the filling department for compilation of the guest’s file. On the reporting date the file is transferred to the reception. On checking in the guest is given the key to his allocated room, he also specifies if he needs room service. The receptionist hands over the guest’s file to the accountant on the next table. Here the guest pays accommodation and meals fee. The guest’s file is updated on daily basis of his expenditure costs. The accounts department generates the bills on daily basis and delivered to the guests in their rooms at dusk by the service maids. The guest pays at the accounts
  • 12.
    12 desk, where thereceipts are generated. For a one meal customer the bill is generated immediately after ordering and he pays at the accountant desk before leaving. During checking out of guests, their expenditure outlines are generated a day before check outdate. The guests receive their outlines at the accounts desk as they check out, where they pay for bills balances if any. DISADVANTAGES OF EXISTING SYSTEM  Guest files can easily get lost or mix up with other guest file documents.  Files occupy a large storage space.  Unnecessary duplication of data.  Files are prone to theft unauthorized modification due to low data security levels and standards.  Due to easy access to guest data by unauthorized users, guest data is extremely unconfident.  Retrieval of guest records is extremely difficult.  Data entry procedure is prone to errors.
  • 13.
    13  Guest recordsare extremely difficult to modify since modification generates dirty and unpresentable reports. PROPOSED SYSTEM: In our proposed system, we have the provision for adding details and requirements of the customer by themselves. So the overhead of the hotel management and the employees becomes less. The customer can use all those available features easily without any restriction. It is too easy to use; the customer can check the total cost of staying in the hotel easily with each and every detail. It also manages the bill of the customer felicitously without any mismatches. ADVANTAGES OF PROPOSED SYSTEM The system enables easy and fast access to the guest files. The system provides better data management facilities.
  • 14.
    14 The system providessecurity measures to access to the hotel’s information lowering data security threats. Easy update of the guest records. Reduction of data entry and processing errors. Greatly reduce paper use at the hotel.
  • 15.
    15 ABOUT PYHTON &MySQL Python is an interpreted language as python programs are executed by an interpreter. Thus, Python interpreter should be installed on the computer system to write and run python programs. We have also learnt that Python IDLE (Integrated Development and Learning Environment) provides two working modes interactive mode (popularly known as python shell) and script mode. SQL (Structured Query Language) is a standard language for accessing and manipulating database. SQL commands are used to create, transform and retrieve information from Relational Database Management System (RDMS) and to create an interface between user and database. By using SQL commands, one can search for any data, remove rows, drop table etc.
  • 16.
    16 Database Design In theprogram we have sqlite3 function for using database queries in the program. In this program we have used database for Name of the person, Gender, Age, Address, Contacts. Then this will be stored in the database calling it in the function of the database command. The users will be asked their details to be filled. We have make the program that no detail should be empty every detail should be filled according to it. TAbLE: Member
  • 17.
    17 CODING # HOTEL MANAGEMENTSYSTEM class hotelfarecal: def __init__(self,rt='',s=0,p=0,r=0,t=0,a=1800,name='', address='',cindate='',coutdate='',rno=101): print ("nn*****WELCOME TO HEWING HOTEL*****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
  • 18.
    18 self.cindate=cindate self.coutdate=coutdate self.rno=rno def inputdata(self): self.name=input("nEnter yourname:") 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. type A---->rs 6000 PN-") print ("2. type B---->rs 5000 PN-")
  • 19.
    19 print ("3. typeC---->rs 4000 PN-") print ("4. type D---->rs 3000 PN-") x=int(input("Enter Your Choice Please->")) 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")
  • 20.
    20 self.s=3000*n else: print ("please choosea room") print ("your room rent is =",self.s,"n") 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): 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
  • 21.
    21 elif (c==3): d=int(input("Enter thequantity:")) 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):
  • 22.
    22 print("******LAUNDRY MENU*******") print ("1.Shorts----->Rs3","2.Trousers----- >Rs4","3.Shirt--->Rs5","4.Jeans---->Rs6","5.Girlsuit- -->Rs8","6.Exit") while (1): #broughtto you by code-projects.org 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
  • 23.
    23 elif (e==4): f=int(input("Enter thequantity:")) 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----->Rs60","2.Bowling--- -->Rs80","3.Snooker--->Rs70","4.Video games---- >Rs90","5.Pool--->Rs50==6","6.Exit")
  • 24.
    24 while (1): g=int(input("Enter yourchoice:")) 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:"))
  • 25.
    25 self.p=self.p+50*h elif (g==6): break; else: print ("Invalidoption") 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)
  • 26.
    26 print ("Your laundarybill 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+= def main(): a=hotelfarecal() while (1): print("1.Enter Customer Data") print("2.Calculate rommrent")
  • 27.
    27 print("3.Calculate restaurant bill") print("4.Calculatelaundry bill") print("5.Calculate gamebill") print("6.Show total cost") print("7.EXIT") b=int(input("nEnter your choice:")) if (b==1): a.inputdata() if (b==2): a.roomrent() if (b==3): a.restaurentbill() if (b==4): a.laundrybill() if (b==5):
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
    38 BIBLIOGRAPHY 1. www. python.org 2.www.mysql.com 3. www.google.com 4. Computer Science with Python by Preeti Arora. 5. Computer Science with Python by Sumita Arora.