0% found this document useful (0 votes)
13 views

Computer Science Pr

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Computer Science Pr

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

ANUGRAHA MANDHIR CBSE SENIOR SECONDARY SCHOOL

AFFILATION NO: 1930520


54/3 APPANAICKENPATTI ROAD, KALANGAL VILLLAGE, SULUR,
COIMBATORE – 641 402

PROJECT WORK
IN
COMPUTER SCIENCE (083)
HOTEL MANAGEMENT SYSTEM

IN PARTIAL FULFILLMENT OF THE REQUIREMENT OF THE


ALL INDIA SENIOR SECONDARY CERTIFICATE EXAMINATION
(AISSCE)
BATCH 2023 – 2024

NAME OF THE STUDENT :


CLASS :
CBSE ROLL .NO :
TEACHER INCHARGE :

1|Page
ACKNOWLEDGEMENT

I express my special thanks to my school management for the


constant support extended in the completion of my project. I extend my
sincere gratitude towards Mr. Sreenivasan K the principal of
ANUGRAHA MANDHIR CBSE SENIOR SECONDARY SCHOOL
providing all the facilities for carrying out this project successfully.

I take this opportunity to express my hearty thanks to my computer


science teacher Mrs. Lincy Shobika V for his most sincere co-operation,
constant guidance and valuable suggestion throughout my project.

I would like to thank my parents and friends who have helped me


with their valuable suggestions to complete my project.

PLACE: Sulur
DATE:

(Signature of the student)

2|Page
CERTIFICATE

PROJECT WORK IN COMPUTER SCIENCE

This is to certify that project entitled ______________________ is


the work done by ______________________ of class XII under the
supervision of Mrs. Lincy Shobika V, and submitted for partial
fulfilment of the requirement for AISSCE (2023 – 2024).

Submitted for the partial Examination held at Anugraha Mandhir


CBSE Senior Secondary School, on ________________.

_____________________ _____________________
INTERNAL EXAMINER EXTERNAL EXAMINER

____________________
PRINCIPAL

3|Page
DECLARATION

I hereby declare that the project report entitled in ________________


_____________ submitted to Department of Computer Science in
Academic Year 2023 – 2024.
The information incorporated in this project is true and original to the best
of my knowledge.

4|Page
INDEX

S.NO CONTENT PAGE.NO

1. SYNOPSIS 6

2. OVERVIEW OF PYTHON 7-8

3. OVERVIEW OF MYSQL 9

4. HARDWARE AND SOFTWARE 10


REQUIREMENTS
5. SOURCE CODE 11 – 18

6. OUTPUT 19 – 34

7. BIBLIOGRAPHY 35

5|Page
SYNOPSIS

A Hotel Management System implemented in Python with MySQL


integration is a software solution designed to streamline and automate key
processes within a hotel or hospitality establishment. The system
typically includes modules for reservation management, room allocation,
guest check-in/check-out, billing, and reporting. Here's a brief synopsis
and a simplified example of Python code with MySQL for a basic hotel
management system:
The system allows hotel staff to efficiently manage reservations,
track room availability, and handle guest information. It integrates with a
MySQL database to store and retrieve data, ensuring data consistency and
persistence.

6|Page
OVERVIEW OF PYTHON

Python is a high level, interpreted, interactive and object-oriented


scripting language.
Python was developed by Guido van Rossum at the National
Research Institute for Mathematics and Computer Science in the
Netherlands. Python is derived from many other languages, including
ABC, Modula-3, C, C++, Algol-68, Smalltalk, and Unix shell and other
scripting languages. Python is copyrighted. Like Perl, Python source code
is now available under the GNU General Public License (GPL). Python
is now maintained by a core development team at the institute, although
Guido van Rossum still holds a vital role in directing its progress.

Some of Python's notable features:


 Uses an elegant syntax, making the programs easier to read and
write.
 Is an easy-to-use language that makes it simple to get your
program working. This makes Python ideal for prototype
development and other ad-hoc programming tasks, without
compromising maintainability.
 Comes with a large standard library that supports many common
programming tasks such as connecting to web servers, searching
text with regular expressions, reading and modifying files.
 Python's interactive mode makes it easy to test short snippets of
code. There is also a bundled development environment called
IDLE
 Is easily extended by adding new modules implemented in a
compiled language such as C or C++.

7|Page
 Can also be embedded into an application to provide a
programmable interface,
 Runs anywhere, including Mac OS X, Windows, Linux, and Unix,
with unofficial builds also available for Android and iOS.
 Is free software in two senses. It does not cost anything to
download or use Python, or to include it in your application.
Python can also be freely modified and re-distributed because
while the language is Copyrighted it is available under an open-
source license.

Some programming-language features of Python are:


 A variety of basic data types are available: numbers (floating point,
complex, and unlimited-length long integers), strings (both ASCII
and Unicode), lists, and dictionaries.
 Python supports object-oriented programming with classes and
multiple inheritances.
 Code can be grouped into modules and packages.
 The language supports raising and catching exceptions, resulting in
cleaner error handling.
 Data types are strongly and dynamically typed. Mixing
incompatible types (e.g., attempting to add a string and a number)
causes an exception to be raised, so errors are caught sooner.
 Python contains advanced programming features such as
generators and list comprehensions.
 Python's automatic memory management frees you from having to
manually allocate and free memory in your code.

8|Page
OVERVIEW ON MYSQL

MySQL is an open-source relational database management system


(RDBMS) that plays a crucial role in web development and various
applications. Developed by Oracle Corporation, MySQL is known for its
reliability, scalability, and ease of use. It adheres to the SQL (Structured
Query Language) standards and provides a robust platform for managing
and organizing data.
MySQL is widely utilized for building dynamic web applications,
powering content management systems (CMS), and supporting various
software applications that require efficient data storage and retrieval. It
offers features such as transaction support, data integrity, and the ability
to handle large datasets. MySQL supports various storage engines,
allowing users to optimize their database for specific requirements.
One of MySQL's strengths is its versatility, supporting multiple
platforms and operating systems, including Linux, Windows, and
macOS. It also integrates seamlessly with popular programming
languages like PHP, Python, and Java. Additionally, MySQL provides a
range of tools for database administration and maintenance, making it a
preferred choice for developers and organizations seeking a reliable and
scalable database solution.

9|Page
HARDWARE AND SOFTWARE REQUIREMENTS

Recommended System Requirements Processors:


 Intel® Core™ i3 processor 4300M at 2.60 GHz.
 Disk space: 2 to 4 GB.
 Operating systems: Windows® 10, MACOS, and UBUNTU.
 Python Versions: 3.X.X or Higher.

Minimum System Requirements Processors:


 Intel Atom® processor or Intel® Core™ i3 processor.
 Disk space: 1 GB.
 Operating systems: Windows 7 or later, MACOS, and UBUNTU.
 Python Versions: 2.7.X, 3.6.X.

Prerequisites before installing MySQL Connector Python:


 You need root or administrator privileges to perform the
installation process.
 Python must be installed on your machine.
 Note: – MySQL Connector Python requires python to be in the
system’s PATH. Installation fails if it doesn’t find Python.
 On Windows, If Python doesn’t exist in the system’s PATH, please
manually add the directory containing python.exe yourself

10 | P a g e
SOURCE
CODE

11 | P a g e
SOURCE CODE

# Hotel management system

import time

import mysql.connector

# Establish a database connection

connect = mysql.connector.connect(host="localhost", user="root", password="",

database="hotel_management")

cursor = connect.cursor()

# Create the table (with corrected SQL syntax)

query1 = "CREATE TABLE IF NOT EXISTS hotel_data_customer (name

VARCHAR(100), contact varchar(10) , email varchar(200) , address varchar(200) ,

child int , adult int , no_of_days int , room_no int )"

cursor.execute(query1)

# check out function

def check_out(room_no):

try:

delete_query="DELETE FROM hotel_data_customer WHERE room_no = %s"

cursor.execute(delete_query,(room_no,))

connect.commit()

12 | P a g e
finally:

cursor.close()

# room booking function

def book_a_room():

Name=input("First name : - ")

contact=input("Contact number : - ")

email=input("Email id : - ")

address=input("Address : - ")

days=int(input("No of days : - "))

child=int(input("No of child : - "))

adult=int(input("No of adult : - "))

room_no=int(input("room no : - "))

query="insert into hotel_data_customer values(%s,%s,%s,%s,%s,%s,%s,%s)"

data=(Name , contact , email , address, days , child , adult , room_no )

cursor.execute(query,data)

connect.commit()

print("BOOKING SUCCESFULL")

# hotel status

def hotel_status():

print("""

BOOKING TIMINGS ARE 5:00 AM - 12:00 AM

13 | P a g e
OTHERWISE SPECIAL ENTRY

FULLY BOOKED ON DIWALI

DISCOUNT AVAILABLE IN ICICI BANK ON UPI ALSO

THANK YOU

VISIT AGAIN""")

# creating login function

def after_login():

print("""

=======================================

|| WELCOME TO HOTEL MANAGEMENT ||

=======================================

|| YOU HAVE THESE OPTION AVAILABLE ||

=======================================

|| 1 . BOOK A ROOM ||

=======================================

|| 2 . CHECK OUT ||

=======================================

|| 3 . HOTEL STATUS ||

=======================================

|| 4 . PAYMENT INFO ||

=======================================

|| 5 . CONTACT ||

14 | P a g e
=======================================

|| 6 . VIEW ROOM DETAILS ||

======================================""")

# billing function

def payment_info():

name=input("Enter name:")

query=("select no_of_days from hotel_data_customer where name = %s")

cursor.execute(query,(name,))

result=cursor.fetchone()

if result:

number_of_days = result[0]

print("No of days",number_of_days )

cursor.execute("select name,no_of_days from hotel_data_customer")

bill=number_of_days * 2000

print("YOU ARE TOTAL BILLED OF:",bill)

else:

print(f"No data found for {search_name}.")

# CONTACT FUNCTION

15 | P a g e
def contact():

print("""

==================================================

| YOU MAY CONTACT US ON |

==================================================

| 1 . EMAIL - Aaurahotel911@gmail.com |

==================================================

| 2 . PHONE NUMEBER - 8302426001 |

==================================================

| 3 . ADDRESS - KHATRI BANK BARMER (344001) |

==================================================

| 4 . MEETING TIME 10AM-8PM (MONDAY-FRIDAY) |

==================================================

| THANK YOU |

==================================================""")

# room info of our hotel

def room_data():

print("The data want to be updated")

16 | P a g e
# creating optional function

def first_option():

option=int(input("Enter your option: "))

if option==1:

book_a_room()

if option==2:

room_to_check_out=int(input("Enter room number to check out:"))

check_out(room_to_check_out)

if option==3:

hotel_status()

if option==4:

payment_info()

if option==5:

contact()

if option==6:

room_data()

# Password login loop

while True:

login = input("Enter password to unlock: ")

if login == "123":

17 | P a g e
line = "Logging in, please wait..."

words = line.split()

for word in words:

print(word, end=' ', flush=True)

time.sleep(0.5)

after_login()

first_option()

else:

print("Incorrect password. Try again.")

def room_data():

print("The data want to be updated")

<<<<<<<<<<<<<END OF SOURCE CODE>>>>>>>>>>>>>

18 | P a g e
OUTPUT

19 | P a g e
PYTHON AND MYSQL

LOGIN SCREEN:

20 | P a g e
MAIN SCREEN:

21 | P a g e
ROOM BOOKING SCREEN:
1.

22 | P a g e
2.

23 | P a g e
3.

24 | P a g e
4.

25 | P a g e
5.

26 | P a g e
HOTEL STATUS SCREEN:

27 | P a g e
CONTACT DETAILS OF HOTEL:

28 | P a g e
VIEW ROOM DETAILS SCREEN:

29 | P a g e
DATABASE TABLE:

30 | P a g e
CHECK OUT ROOM SCREEN:

1.

31 | P a g e
DATABASE OUTPUT:

2.

32 | P a g e
VIEW ROOM DETAILS SCREEN:

33 | P a g e
DATABASE OUTPUT:

34 | P a g e
BIBLIOGRAPHY

 Github.com

 Geeksforgeeks.com

 Stackoverflow.com

 Reddit.com

 freeCodeCamp.com

 Chat.openai.com

 w3schools.com

35 | P a g e

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy