Simulates card auth, withdrawals, balance checks, and statements.
Tick off requirements as you build to track real-time completion.
Follow this chronological guide to build the project from scratch.
Create accounts and ledger database tables with balance CHECK constraints.
import sqlite3
def init_bank_db():
with sqlite3.connect("bank.db") as conn:
cursor = conn.cursor()
cursor.execute("""
CREATE TABLE IF NOT EXISTS accounts (
account_num TEXT PRIMARY KEY,
pin_hash TEXT NOT NULL,
balance REAL NOT NULL CHECK(balance >= 0)
)
""")
cursor.execute("""
CREATE TABLE IF NOT EXISTS ledger (
id INTEGER PRIMARY KEY AUTOINCREMENT,
account_num TEXT NOT NULL,
type TEXT CHECK(type IN ('DEPOSIT', 'WITHDRAWAL')),
amount REAL NOT NULL,
timestamp TEXT NOT NULL,
FOREIGN KEY(account_num) REFERENCES accounts(account_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.