0% found this document useful (0 votes)
20 views29 pages

Sainik School Punglwa Nagaland

Uploaded by

yantsuodyuoe
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)
20 views29 pages

Sainik School Punglwa Nagaland

Uploaded by

yantsuodyuoe
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/ 29

Sainik school punglwa

NAGALAND

Name: YANTSUTHUNG ODYUO


Adm no : 1248
Class : xii ‘b’
Subject : computer
Certificate
Year : 2024-25
This is to certify that investigatory
project is successfully completed by
CDT YANTSUTHUNG ODYUO (1503) OF
CLASS 12 ‘b’ FOR THE ACADEMiC YEAR
2024-25 IN THE SCHOOL COMPUTER LAB.

EXTERNAL INTERNAL
EXAMINER EXAMINER

DATE : /2024/25

[PRINCIPAL]
. DEPT. OF COMPUTER SCIENCE
ACKNOWLEDGEMENT :
I CDT YANTSUTHUNG ODYUO OF CLASS 12
WOULD LIKE TO EXPRESS MY SINCERE
GRATITUDE TO MY COMUTER TEACHER
MR. KHOGENDRO ANTHEM ,PGT COMPUTER
SCIENCE, FOR HIS VITAL SUPPORT, GUIDANCE
AND ENCOURAGEMENT WITHOUT WHICH THIS
PROJECT WOULD NOT HAVE COME FORTH. I
WOULD ALSO LIKE TO EXPRESS OUR
GRATITUDE TO OUR SAINIK SCHOOL PUNGLWA
FOR PROVIDING SCHOOL COMPUTER LAB.
CONTENT
1) INTODUCTION
2) REQIREMENT
3) SCOPE OF THE PROJECT
4) SOURCE CODE
5) OUTPUT
6) REFRENCE
INTRODUCTION
Below is an example of a Python program
that uses file handling to manage hotel
administrative tasks such as guest
registration, booking management, and
checking out. The program will store guest
information and bookings in a file, allowing
the hotel management team to read and
write guest data.

Steps in the program:

1. Add a guest: Register a guest's details.


2. Book a room: Assign a room to a guest
and mark it as booked.
3. Check out a guest: Mark a guest's room
as available when they check out.
4. View all bookings: Display the list of all
bookings.
5. Exit the system: Close the program.
REQUIREMENTS
HARDWARE :

• THE HARDWARE REQUIREMENTS ARE


LAPTOP OR COMPUTER OF RAM 4.00 GB
32 BIT OPERATING SYSTEM
• PRINTER
SOFTWARE :
• A WINDOW BASED OPERATING
SYSTEM WITH DOS SUPPORT
• THE SYSTEM MUST BE CONNECTED WITH
A LAN CONNECTION

MEMORY REQUIREMENTS :
• HARD DISK OF ABOUT 152 GB
SCOPE OF THE PROJECT
THE SCOPE OF THE HOTEL MANAGEMENT
SYSTEM PROJECT ENCOMPASSES VARIOUS
ASPECTS OF MANAGING ROOM
INFORMATION AND ABOUT FOOD SERVING
HERE ARE KEY AREAS COVERED BY THE
PROJECT:
1) ADD A GUEST
2) BOOK A ROOM
3) CHECK OUT A GUEST
4) VIEW ALL BOOKINGS
5) EXIT
SOURCE CODE
import os
# Function to add a new guest def
add_guest():
guest_name = input("Enter guest
name: ")
guest_phone = input("Enter guest
phone number: ")
guest_email = input("Enter guest
email address: ")

with open('guests.txt', 'a') as file:


file.write(f'{guest_name},{guest_ph
one},{guest_email},Not Booked\n')
print(f"Guest {guest_name} added
successfully!\n")

# Function to book a room for a


guest def book_room():
guest_name = input("Enter guest
name to book a room: ") found =
False updated_guests = []

# Reading existing guests with


open('guests.txt', 'r') as file:
guests = file.readlines()
for guest in guests:
name, phone, email, status =
guest.strip().split(',') if
name.lower() ==
guest_name.lower() and status ==
'Not Booked':

updated_guests.append(f"{name},{ph
one},{email},Booked\n")
found = True
else:
updated_guests.appen
d(guest)
if found:
with open('guests.txt', 'w') as
file:

file.writelines(updated_guests)
print(f"Room booked successfully
for {guest_name}!\n") else:
print(f"Guest {guest_name} not
found or already booked.\n")

# Function to check out a guest def


check_out():
guest_name = input("Enter guest
name to check out: ") found =
False updated_guests = []

# Reading existing guests with


open('guests.txt', 'r') as file:
guests = file.readlines()

for guest in guests:


name, phone, email, status =
guest.strip().split(',') if
name.lower() ==
guest_name.lower() and status ==
'Booked':
updated_guests.append(f"{name},{ph
one},{email},Not Booked\n")
found = True
else:
updated_guests.append(guest)

if found:
with open('guests.txt', 'w') as
file:

file.writelines(updated_guests)
print(f"{guest_name} checked
out successfully!\n") else:
print(f"Guest {guest_name} not
found or not booked.\n")

# Function to view all bookings def


view_bookings(): if not
os.path.exists('guests.txt'):
print("No guest records
found.\n")
return

print("\nCurrent guest bookings:")


with open('guests.txt', 'r') as file:
guests = file.readlines()
if not guests:

print("No bookings
available.\n") else:
for guest in guests:
name, phone, email, status =
guest.strip().split(',')
print(f"Name: {name}, Phone:
{phone}, Email: {email}, Status:
{status}")
print()

# Main function to run the hotel


management system def
hotel_management_system():
while True:

print("\nHotel Management
System")
print("1. Add Guest")
print("2. Book Room")
print("3. Check Out Guest")
print("4. View Bookings")
print("5. Exit")

choice = input("Enter your choice:


")
if choice == '1':
add_guest() elif
choice == '2':
book_room() elif
choice == '3':
check_out() elif
choice == '4':
view_bookings()
elif choice == '5':
print("Exiting the system...")
break else:
print("Invalid choice, please
try again.")
# Initialize the system if not
os.path.exists('guests.txt'):
with open('guests.txt', 'w') as file:

file.write("") # Create the file if


it doesn't exist

hotel_management_system()
OUTPUT
CONCLUSION
THIS PROJECT IS MADE IN ORDER TO
REPLACE MANUAL WORK, i.E. LIKE
WRITING DOWN CUSTOMER DETAILS
ETC. THIS ALSO HELPS THE PEOPLE
USING THIS TO SAVE SPACE AND SAVE
MONEY. THIS IS VERYCOST EFFECTIVE
WAY TO RUN A BUSINESS. OVERALL
IMPROVES EFFICIENCY.
Certificate
Year : 2024-25
This is to certify that investigatory
project is successfully completed by
CDT YANTSUTHUNG ODYUO (1503) OF
CLASS 12 ‘b’ FOR THE ACADEMiC YEAR
2024-25 IN THE SCHOOL PHYSICS LAB.

EXTERNAL INTERNAL
EXAMINER EXAMINER

DATE : /2024/25

[PRINCIPAL]
DEPT. OF PHYSICS
Certificate
Year : 2024-25
This is to certify that investigatory
project is successfully completed by
CDT YANTSUTHUNG ODYUO (1503) OF
CLASS 12 ‘b’ FOR THE ACADEMiC YEAR
2024-25 IN THE SCHOOL CHEMISTRY LAB.

EXTERNAL INTERNAL
EXAMINER EXAMINER

DATE : /2024/25

[PRINCIPAL]
. DEPT. OF CHEMISTRY SCIENCE
Certificate
Year : 2024-25
This is to certify that investigatory
project is successfully completed by
CDT YANTSUTHUNG ODYUO (1503) OF
CLASS 12 ‘b’ FOR THE ACADEMiC YEAR
2024-25 IN THE SCHOOL.

EXTERNAL INTERNAL
EXAMINER EXAMINER

DATE : /2024/25

[PRINCIPAL]
. DEPT. OF ENGLISH
ACKNOWLEDGEMENT :

I CDT YANTSUTHUNG ODYUO OF CLASS 12


WOULD LIKE TO EXPRESS MY SINCERE
GRATITUDE TO MY COMUTER TEACHER
MR. ASHOK KUMAR DAS ,PGT PHYSICS
SCIENCE, FOR HIS VITAL SUPPORT, GUIDANCE
AND ENCOURAGEMENT WITHOUT WHICH THIS
PROJECT WOULD NOT HAVE COME FORTH. I
WOULD ALSO LIKE TO EXPRESS OUR
GRATITUDE TO OUR SAINIK SCHOOL PUNGLWA
FOR PROVIDING SCHOOL PHYSICS LAB.
ACKNOWLEDGEMENT :

I CDT YANTSUTHUNG ODYUO OF CLASS 12


WOULD LIKE TO EXPRESS MY SINCERE
GRATITUDE TO MY COMUTER TEACHER
MR. PRAVEEN VERMA ,PGT CHEMISTRY
SCIENCE, FOR HIS VITAL SUPPORT, GUIDANCE
AND ENCOURAGEMENT WITHOUT WHICH THIS
PROJECT WOULD NOT HAVE COME FORTH. I
WOULD ALSO LIKE TO EXPRESS OUR
GRATITUDE TO OUR SAINIK SCHOOL PUNGLWA
FOR PROVIDING SCHOOL CHEMISTRY LAB.
ACKNOWLEDGEMENT :

I CDT YANTSUTHUNG ODYUO OF CLASS 12


WOULD LIKE TO EXPRESS MY SINCERE
GRATITUDE TO MY COMUTER TEACHER
MR. TSONGA SEMP ,PGT ENGLISH
SCIENCE, FOR HIS VITAL SUPPORT, GUIDANCE
AND ENCOURAGEMENT WITHOUT WHICH THIS
PROJECT WOULD NOT HAVE COME FORTH. I
WOULD ALSO LIKE TO EXPRESS OUR
GRATITUDE TO OUR SAINIK SCHOOL PUNGLWA.

You might also like