This is a simple Hotel Booking System built in Python, designed to manage hotel room bookings directly from the terminal. It allows users to view available rooms, make reservations, cancel bookings, and save or load booking data using a JSON file.
- View available rooms by type or list all
- Book a room with guest name and duration
- Cancel an existing booking by confirming guest name
- View all current bookings
- Search bookings by guest name
- Save bookings to a
.jsonfile - Load bookings from a saved
.jsonfile
Room types are determined by the room number:
| Room Type | Criteria | Price |
|---|---|---|
| Apartment | Room 1, 99, 101, 199 | $120.00 |
| Deluxe | Room number divisible by 3 | $85.00 |
| Suite | Room number divisible by 5 | $100.00 |
| Double | Room number divisible by 2 | $75.00 |
| Twins | All other rooms | $75.00 |
- Make sure you have Python 3 installed.
- Save the code in a file named something like
hotel_booking.py. - Open your terminal or command prompt.
- Run the script using:
python hotel_booking.py