Professional Documents
Culture Documents
NOIDA
INVESTIGATORY
PROJECT
ACKNOWLEDGEMENT
I would like to express my sincere gratitude to my Biology
teacher Ms. Meera Jain for introducing me to this topic and
encouraging me to carry out with the project. I would like to
thank her for giving me guidance and moral support, all
throughout this academic year. This project has given me a
deeper understanding of the subject.
Abhinav Chaudhary
XII-Science
CERTIFICATE
This is to certify that Abhinav Chaudhary of class XII-Science
of LPS Global School has satisfactorily completed the project
under the supervision of Ms. Meera Jain and has taken proper
care and shown utmost sincerity in completion of this project as
per the CBSE guidelines.
CONTENTS
Certificate
Acknowledgement
Synopsis
Source Code
Output
Bibliography
HARDWARE AND
SOFTWARE
REQUIREMENTS
PYTHON INBUILT FUNCTIONS
WINDOWS 7/8/10
RAM 512 TO 4 GB
HDD 40 GB TO 1 TB
MYSQL CONNECTIVITY
FLOW OF CONTROL
INTRODUCTION TO
PYTHON AND MYSQL
Python is a flexible, portable, easy to learn and modifiable
language. So, we are integrating MYSQL with Python interface
for executing any database applications.
The several reasons to use Python for programming database
applications are:
Advantages of MySQL:
db=mysql.connector.connect(host='localhost',user='root',p
asswd='12345',database='HOTEL_MANAGEMENT')
mycursor=db.cursor()
Ccode=int(input('\nEnter Code of Customer to be
Updated:'))
qry=('select * from hoteldata where Ccode=%s')
Cadd=input("Enter Customer Adrress:")
q=('update hoteldata set Cadd=%s where Ccode=%s')
data=(Cadd,Ccode)
mycursor.execute(q,data)
q=('update customer set Cadd=%s where Ccode=%s')
data=(Cadd,Ccode)
mycursor.execute(q,data)
print('\nRecord Updated.....')
db.commit()
mycursor.close()
db.close()
elif (c==3):
db=mysql.connector.connect(host='localhost',user='root',p
asswd='12345',database='HOTEL_MANAGEMENT')
mycursor=db.cursor()
Ccode=int(input('\nEnter Code of Customer to be
Updated:'))
qry=('select * from hoteldata where Ccode=%s')
Cindate=input("Enter Customer in Date:")
q=('update hoteldata set Cindate=%s where Ccode=%s')
data=(Cindate,Ccode)
mycursor.execute(q,data)
q=('update customer set Cindate=%s where Ccode=%s')
data=(Cindate,Ccode)
mycursor.execute(q,data)
print('\nRecord Updated.....')
db.commit()
mycursor.close()
db.close()
elif (c==4):
db=mysql.connector.connect(host='localhost',user='root',p
asswd='12345',database='HOTEL_MANAGEMENT')
mycursor=db.cursor()
Ccode=int(input('\nEnter Code of Customer to be
Updated:'))
qry=('select * from hoteldata where Ccode=%s')
Coutdate=input("Enter Customer out Date:")
q=('update hoteldata set Coutdate=%s where Ccode=%s')
data=(Coutdate,Ccode)
mycursor.execute(q,data)
q=('update customer set Coutdate=%s where Ccode=%s')
data=(Coutdate,Ccode)
mycursor.execute(q,data)
print('\nRecord Updated.....')
db.commit()
mycursor.close()
db.close()
elif (c==5):
db=mysql.connector.connect(host='localhost',user='root',p
asswd='12345',database='HOTEL_MANAGEMENT')
mycursor=db.cursor()
Ccode=int(input('\nEnter Code of Customer to be
Updated:'))
qry=('select * from customer where Ccode=%s')
Ccontact_no=input("Enter Customer Contact number:")
q=('update customer set Ccontact_no=%s where Ccode=
%s')
data=(Ccontact_no,Ccode)
mycursor.execute(q,data)
print('\nRecord Updated.....')
db.commit()
mycursor.close()
db.close()
else :
print("Invalid Input!!")
print("\n\t\t\t\t\t\t\t\t
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░")
print("֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎
֎֎\ ֎֎֎֎֎֎֎֎֎֎░░ WELCOME TO THE TAJ PALACE
░░֎֎֎֎֎֎֎֎֎\
֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎֎"
)
print("\t\t\t\t\t\t\t\t
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░")
while True:
print("\n")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~")
print("1.Speciality of your Hotel")
print("2.Customer Management")
print("3.Booking for Private Party")
print("4.EXIT")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~")
b=input("\nEnter your choice:")
if (b=='1'):
speciality()
elif (b=='2'):
hotelfarecal()
elif (b=='3'):
party()
elif (b=='4'):
quit()
else:
print("Wrong Choice")
OUTPUT
2. Speciality of Hotel
3. Customer Management
4. Inserting data of customer
5. Inserting data of various services
6. Displaying customers in hotel
7. Displaying customer by its code
https:/www.geeksforgeeks.org
https://pynative.com
https://stackoverflow.com