SQLite guest allocation system managing checkins and billing.
Tick off requirements as you build to track real-time completion.
Follow this chronological guide to build the project from scratch.
Create rooms and guest bookings database tables.
import sqlite3
def init_hotel_db():
with sqlite3.connect("hotel.db") as conn:
cursor = conn.cursor()
cursor.execute("""
CREATE TABLE IF NOT EXISTS rooms (
room_num TEXT PRIMARY KEY,
category TEXT NOT NULL,
rate_per_night REAL NOT NULL,
status TEXT DEFAULT 'Available'
)
""")
cursor.execute("""
CREATE TABLE IF NOT EXISTS bookings (
id INTEGER PRIMARY KEY AUTOINCREMENT,
guest_name TEXT NOT NULL,
room_num TEXT NOT NULL,
checkin_date TEXT NOT NULL,
checkout_date TEXT,
total_bill REAL DEFAULT 0.0,
FOREIGN KEY(room_num) REFERENCES rooms(room_num)
)
""")
conn.commit()Real issues students hit during development and how to troubleshoot them fast.
Continue building your skills with similar projects.
Sleek weather dashboard using OpenWeather API with geolocation, 5-day forecast, and dynamic weather themes.
Personal budget tracker with transaction log, category breakdown, and Chart.js pie charts.
Movie discovery app with TMDB API, trending lists, search, and detail modals.