Main Project Ip XII 2026 Abhishek
Main Project Ip XII 2026 Abhishek
Project File Of
Informatics Practices
Hotel Management
System
Submitted By:
Name: Abhishek Singh
Class: XII B
Roll no:
INDEX
S. No Description Page
No.
1 Certificate 01
3 Introduction to Project 03
4 Source code 04 – 09
5 Output screen 10 – 15
requirements
Certificate
Date: …………………………
Signature of Principal
Acknowledgment
I would like to express my heartfelt gratitude to my teacher,
Vishal Kumar Srivastava, for their valuable guidance and
support throughout this project. I am also thankful to my
school, Scholar’s Academy, for providing the necessary
resources, and to my family and friends for their
encouragement. This project would not have been possible
without their support.
ABHISHEK SINGH
XII B
Reference
1. Class notes,
2. Informatics Practices by Sumita Arora
3. Learn Python.org
4. python.org
5. tutorialspoint.com
6. hospitalitynet.org
7. hotelmanagement.net
Introduction to the Project
This Hotel Management System simplifies hotel operations using Python and
SQLite. It manages customer details, room bookings, and billing efficiently.
1. **Customer Management**:
- Add and retrieve customer details.
2. **Room Booking**:
- Book rooms with different pricing options.
- Calculate total booking charges.
3. **Billing**:
- Calculate and display the total bill.
### Conclusion
# Book Room
def bookRoom():
if connection:
cursor = connection.cursor()
customer_detail = input("Enter Customer ID or Name: ")
cursor.execute("SELECT * FROM C_DETAILS WHERE CID = ? OR
C_NAME = ?", (customer_detail, customer_detail))
customer = cursor.fetchone()
if customer:
cid = customer[0]
else:
print("Customer not found!")
return
if room_choice == 5:
print("Exiting the process. No room booked.")
return
try:
start_date_obj = datetime.strptime(start_date, '%Y/%m/%d')
end_date_obj = datetime.strptime(end_date, '%Y/%m/%d')
days_of_stay = (end_date_obj - start_date_obj).days
if days_of_stay <= 0:
print("Invalid date range. End date must be after start date.")
return
except ValueError:
print("Invalid date format. Please enter dates in YYYY/MM/DD
format.")
return
if room_choice == 1:
roomRent = days_of_stay * 10000
elif room_choice == 2:
roomRent = days_of_stay * 5000
elif room_choice == 3:
roomRent = days_of_stay * 3500
elif room_choice == 4:
roomRent = days_of_stay * 2500
else:
print("Invalid choice! Exiting the process.")
return
if customer:
cid = customer[0]
else:
print("Customer not found!")
return
# Show Customer
def showCustomerDetails():
if connection:
cursor = connection.cursor()
customer_detail = input("Enter Customer ID or Name: ")
cursor.execute("SELECT * FROM C_DETAILS WHERE CID = ? OR
C_NAME = ?", (customer_detail, customer_detail))
customer = cursor.fetchone()
if customer:
print("\nCustomer found:")
print(f"ID: {customer[0]}")
print(f"Name: {customer[1]}")
print(f"Address: {customer[2]}")
print(f"Age: {customer[3]}")
print(f"Country: {customer[4]}")
print(f"Contact Number: {customer[5]}")
print(f"Email: {customer[6]}")
else:
print("Customer not found!")
cursor.close()
else:
print("\nError establishing SQLite connection!")
# Main Menu
def main():
SQLiteconnectionCheck()
while True:
print("""
1. Add New Customer
2. Book a Room
3. Show Total Bill
4. Show Customer Details
5. Exit
""")
choice = int(input("\nEnter your choice: "))
if choice == 1:
addNewCustomer()
elif choice == 2:
bookRoom()
elif choice == 3:
showTotalBill()
elif choice == 4:
showCustomerDetails()
elif choice == 5:
print("\nThank you for using the system!")
break
else:
print("\nInvalid choice! Please try again.")
if __name__ == "__main__":
main()
Output Screens
Main Screen
TOTAL BILL
DETAILS OF THE CUSTOMER
EXIT
MySQL DATABASE AND TABLES USED IN
THIS PROJECT
DATABASE
C_DETAILS TABLE
ROOM_RENT
Hardware and Software Requirements
1. Hardware Requirement
2. Software Requirement
○ MS Windows
○ Python with related library used for data analysis
■ Pandas
■ Numpy
■ Matplotlib
○ SQ lite for RDBMS.