Assigns hostel rooms to applicants based on class rolls and priorities.
Tick off requirements as you build to track real-time completion.
Follow this chronological guide to build the project from scratch.
Create rooms and student applications tables with capacity limits.
import sqlite3
def init_hostel_db():
with sqlite3.connect("hostel.db") as conn:
cursor = conn.cursor()
cursor.execute("""
CREATE TABLE IF NOT EXISTS rooms (
room_num TEXT PRIMARY KEY,
capacity INTEGER NOT NULL,
occupied INTEGER DEFAULT 0
)
""")
cursor.execute("""
CREATE TABLE IF NOT EXISTS allocations (
id INTEGER PRIMARY KEY AUTOINCREMENT,
student_id TEXT UNIQUE NOT NULL,
room_num TEXT NOT NULL,
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.