Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 25

CERTIFICATE

] This is to certify that the “Computer science


Project” On the topic “online bus reservation” Has
been successfully completed by Poshit Nagda of
class 12th under the guidance of Dr. Murdhar
Rathore in the particular fulfillment of the
curricular of Central Board Of Secondary
Education (CBSE) leading to the award of annual
examination of the year (2022-23).

Dr. Murdhar Rathore Dr. Seema Naruka External Examiner


HOD[Computer Science] [Principal] [CBSE
ACKNOWLEDGEMENT

It is my pleasant duty to acknowledge my sincere gratitude and


heartful thanks to all those who encouraged , guided and helped
me in the completion and retirement of this report . I’m very
indebted to DR.MURDHAR RATHORE mam for giving me her
kind consent to undertake my project report and for directing
and guiding my work and providing me with all the necessary
encouragement .
It gives me great pleasure to acknowledge my humble
indebtedness to my Principal DR. SEEMA NARUKA for
providing me excellent facilities and encouragement despite of
their multiple responsibilities .
I shall failing in my duties if I do not express my gratitude to my
family members and all friends for their moral support and
encouragement.

Name : Date :
Poshit Nagda
content
 ABOUT PYTHON
 FEATURES OF PYTHON
 ABOUT My SQL
 FEATURE OF My SQL
 REQUIREMENTS
 ABOUT THE PROJECT
 CODING
 TABLE STRUCTURE
 BIBLIOGRAPHY
About Python……

Python is an interpreter, high level and general purpose programming


language. Python’s design philosophy emphasize s code readability with
its notable use of significant white space. Its language constructs and
object oriented approach aim to help programmers write clear, logical
code for small and large scale projects. Python is dynamically typed and
garbage-collected. It supports multiple programming paradigms,
including structured object oriented and functional programming.
Python is often described as a ‘batteries included’ language due to its
comprehensive standard library. Python was created in the late1980s,
and first released in 1991,by Guido von Rossum as a successor to the
ABC programming language.
Features Of Python

1. EASY TO USE.
2. INTEPRETED LANGUAGE
3. CROSS PLATFORM LANGUAGE
4. EXPRESSIVE LANGUAGE
5. COMPLETENESS
6. FREE & OPEN SOURCE

SHORT COMINGS OF
PYTHON
1.LESSER LIBRARIES
2.SLOW LANGUAGE
3. WEAK ON TYPE BINDING
About MYSQL……
MySQL is currently the most popular open source
database software. It is a multi-user, multi threated
database management system. MySQL is espically
popular on the web. It is one of the parts of the very
popular LAMP platform. Linux , Apache, MySQL and
PHP or WIMP platform Windows. All was founded by
Michael Wide (Monty).David Axmark and Allan
Larsson in Sweden in year 1995.
Features Of MySQL
Open source & free of cost:

1.Probablity: Small enough in size to install


and runit in any types of Hardware and OS like
Linux, MS Windows,etc
2.Security: Its Database are secured & protected
with password.

3.Connectivity: Various API’s are developed to


connect it with many programming languages
Requirements......
Hardware Requirements
1.Computer: for coding and typing the required
documents of the p roject.
2.Printer: to print the required documents of the project.
3..Compact drive.
4.Processor : Pentium quadcore
5.RAM: 64 mb
6.Hardisk: 20 gb.

Software requirements
1. Opening system: windows 10.
2. Python 3: for execution of program.
3. MySQL: for starting data in database
4. . Python-MySQL Connector: for database
connectivity.
5. Microsoft Word: for presentation of output.
About The Project…
My project on “HOTEL MANAGEMENT
SYSTEM” gives an about idea about management in
hotel. The package gives all the information
regarding the maintenance of 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, calculation
room rent, restaurant bill, laundry bill, etc.
Coding:
import os
import platform
import mysql.connector
import pandas as pd
import datetime
global z
mydb = mysql.connector.connect(user='root', password='poshit',
host='localhost',
database='hotel')
mycursor=mydb.cursor()

def registercust():
L =[]
name=input("enter name:")
L.append(name)
addr=input("enter address:")
L.append(addr)
indate=input("enter check in date:")
L.append(indate)
outdate=input("enter check out date:")
L.append(outdate)
cust=(L)
sql="insert into custdata(name,addr,indate,outdate)values(%s,%s,%s,
%s)"
mycursor.execute(sql,cust)
mydb.commit()
def roomtypeview():
print("Do yoy want to see room type available : Enter 1 for yes :")
ch=int(input("enter your choice:"))
if ch==1:
sql="select * from roomtype"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
def roomrent():
print ("We have the following rooms for you:-")
print ("1. type A >rs 1000 PN\-")
print ("2. type B >rs 2000 PN\-")
print ("3. type C >rs 3000 PN\-")
print ("4. type D >rs 4000 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")
s=1000*n
elif (x==2):
print ("you have opted room type B")
s=2000*n
elif (x==3):
print ("you have opted room type C")
s=3000*n
elif (x==4):
print ("you have opted room type D")
s=4000*n
else:
print ("please choose a room")
print ("your room rent is =",s,"\n")
def restaurentmenuview():
print("Do yoy want to see mebu available : Enter 1 for yes :")
ch=int(input("enter your choice:"))
if ch==1:
sql="select * from restaurent"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)

def orderitem(): global s


print("Do yoy want to see mebu available : Enter 1 for yes :")
ch=int(input("enter your choice:"))
if ch==1:
sql="select * from restaurent"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)

print("do you want to purchase from above list:enter your choice:")


d=int(input("enter your choice:"))
if(d==1):
print("you have ordered tea")
a=int(input("enter quantity"))
s=10*a
print("your amount for tea is :",s,"\n")
elif (d==2):

print("you have ordered coffee")


a=int(input("enter quantity"))
s=10*a
print("your amount for coffee is :",s,"\n")
elif(d==3):
print("you have ordered colddrink")
a=int(input("enter quantity"))
s=20*a
print("your amount for colddrink is :",s,"\n")
elif(d==4):
print("you have ordered samosa")
a=int(input("enter quantity"))
s=10*a
print("your amount fopr samosa is :",s,"\n")
elif(d==5):
print("you have ordered sandwich")
a=int(input("enter quantity"))
s=50*a
print("your amount fopr sandwich is :",s,"\n")
elif(d==6):
print("you have ordered dhokla")
a=int(input("enter quantity"))
s=30*a
print("your amount for dhokla is :",s,"\n")
elif(d==7):
print("you have ordered kachori")
a=int(input("enter quantity"))
s=10*a
print("your amount for kachori is :",s,"\n")
elif(d==8):
print("you have ordered milk")
a=int(input("enter quantity"))
s=20*a
print("your amount for kachori is :",s,"\n")
elif(d==9):
print("you have ordered noodles")
a=int(input("enter quantity"))
s=50*a
print("your amount for noodles is :",s,"\n")
elif(d==10):
print("you have ordered pasta")
a=int(input("enter quantity"))
s=50*a
print("your amount for pasta is :",s,"\n")
else :
print("please enter your choice from the menu")
def laundarybill():
global z
print("Do yoy want to see rate for laundary : Enter 1 for yes :")
ch=int(input("enter your choice:"))
if ch==1:
sql="select * from laundary"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
y=int(input("Enter Your number of clothes->"))
z=y*10
print("your laundary bill:",z,"\n")
return
def lb():
print(z)
def res():
print(s)
def viewbill():
a=input("enter customer name:")
print("customer name :",a,"\n")
print("laundarey bill:")
print(lb)
print("restaurent bill:")
print(res)

def Menuset():
print("enter 1: To enter customer data")
print("enter 2 : To view roomtype")
print("enter 3 : for calculating room bill")
print("enter 4 : for viewing restaurent menu")
print("enter 5 : for restaurent bill")
print("enter 6 :for laundary bill")
print("enter 7 : for complete bill")
print("enter 8 : for exit:")
try:
userinput=int(input("pleaseselect an above option:"))
except valueerror:
exit("\n hi thats not a number")

userinput=int(input("enter your choice"))


if(userinput==1):

registercust()
elif(userinput==2):
roomtypeview()
elif(userinput==3):
roomrent()
elif(userinput==4):
restaurentmenuview()
elif(userinput==5):
orderitem()
elif(userinput==6):
laundarybill()
elif(userinput==7):
viewbill()
elif(userinput==8):
quit()
else:
print("enter correct choice")
Menuset()
def runagain():
runagain=input("\n want to run again y/n:")
while(runagain.lower()=='y'):
if(platform.system()=="windows"):
print(os.system('cls'))
else:
print(os.system('clear'))
Menuset()
runagain=input("\n want to run again y/n:")
runagain()
Output:
Table Structure:
Bibliography

1. Computer Science Textbook Class 12 th


: Sumita
A rora
2.www.google.com
3.www.python.org.in
4.www.mysql.org.in#

You might also like