Learning Resources
Projects
A curated set of Python project ideas from beginner to capstone. Each idea lists the features to implement, a realistic time estimate, and the exact concepts required — every concept linked to its lesson.
Python Projects — Ideas & Concepts Required
26 project ideas from your first console program to portfolio-grade OOP, collections, and concurrency work. Each idea has a brief, features to implement, the exact Python concepts it exercises (linked to lessons), and a time estimate — plus a build guide with suggested modules and classes, step-by-step milestones, a sample run, stretch goals, and the question an interviewer is likely to ask about it.
Which Project Should I Build?
| If your goal is… | Start with |
|---|---|
| Your first program after loops | Number Guessing Game or ATM Simulator |
| Practise lists, dicts, and functions | Student Marks Analyser |
| Learn file handling | Expense Tracker or Contact Book |
| Show OOP in interviews | Bank Account Hierarchy or Employee Payroll |
| Prepare for low-level design rounds | Parking Lot System and Library Management |
| Show collections mastery | Word Frequency or Inventory Management |
| Show concurrency | Task Queue + Worker or Concurrent Download Simulator |
| One portfolio showpiece | Personal Finance Manager or Hotel Room Booking |
Build at least one project from each tier. For placements, two solid projects — one OOP-heavy, one Collections- or concurrency-heavy — with clean READMEs are worth more than ten half-finished ones.
Beginner Projects
Console programs that need input(), decisions, loops, lists/strings, and functions. Finish one in a sitting and put it on your resume early.
Menu-Driven Calculator 4–6 hrs
A looping calculator with arithmetic, power, and percentage — practise clean menus and input validation with try/except in Python.
Features to implement
- Numbered menu that repeats until quit
- Divide-by-zero and bad-input handling
- Optional history of the last N results
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
calculator.py— Functions: add, subtract, multiply, divide, power, percenthistory— A collections.deque(maxlen=N) that keeps the last N resultsapp.py— main() loop — shows the menu, reads input, prints results
Build it step by step
- Print the menu and read a choice inside a while True loop.
- Write one function per operation and map choices to them with a dict.
- Validate numbers with try/except ValueError and reject division by zero.
- Add the history deque and a Show history option.
- Format every result with an f-string such as f"{result:.2f}".
Sample run
1 Add 2 Subtract 3 Multiply 4 Divide 5 Power 0 Exit
Choice: 4
First number: 10
Second number: 0
Error: cannot divide by zero
Choice: 5
First number: 2
Second number: 10
Result: 1024.00 Stretch goals
- Parse a full expression such as 12 + 7 * 2 safely
- Add square root and modulus
- Save history to a file on exit
Interview angle: Explain how invalid input is handled without crashing — try/except ValueError plus a retry loop.
Number Guessing Game 3–4 hrs
Computer picks a secret number; player guesses with higher/lower hints and a score by attempts.
Features to implement
- Random number generation
- Difficulty levels
- Play-again loop
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
GuessingGame— Secret number, attempts, and the check(guess) logiclevels— Dict of difficulty name to (low, high, max_attempts)app.py— Difficulty menu, play-again loop, best score
Build it step by step
- Generate the secret with random.randint(low, high).
- Loop: read a guess, print Too high / Too low, count attempts.
- Stop when the guess is right or attempts run out.
- Add Easy (1–50), Medium (1–100), and Hard (1–500) levels.
- Track the best score across rounds.
Sample run
Level (1 Easy, 2 Medium, 3 Hard): 2
Guess (1-100): 50
Too high!
Guess (1-100): 25
Too low!
Guess (1-100): 37
Correct! You took 3 attempts. Best: 3
Play again? (y/n): n Stretch goals
- Warmer / colder hints based on distance
- Save the high score to a file
- Reverse mode: the computer guesses your number with binary search
Interview angle: Why binary search needs at most 7 guesses for 1–100 (log₂100 ≈ 6.6).
Pattern Printing Studio 3–5 hrs
Prints pyramids, diamonds, and number patterns of user-chosen size with a tidy menu.
Features to implement
- At least eight patterns
- User-controlled size
- One function per pattern
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
patterns.py— One function per pattern, each taking a size nPATTERNS— Dict that maps menu choices to pattern functionsapp.py— Menu, size input, and dispatch to the right function
Build it step by step
- Start with a right triangle of stars using two nested loops.
- Add the pyramid: print spaces and stars per row with string repetition ("*" * k).
- Build the diamond from an upper and a lower pyramid.
- Add number patterns such as Floyd and Pascal triangles.
- Wire everything into a menu with size validation.
Sample run
Pattern (1 Triangle, 2 Pyramid, 3 Diamond): 2
Size: 4
*
***
*****
******* Stretch goals
- Hollow versions of each shape
- Let the user choose the character
- Write the pattern to a text file with pathlib
Interview angle: Describe how the row number decides the count of spaces and stars in each line.
Unit Converter 3–5 hrs
Converts temperature, length, and weight categories with f-string formatted output.
Features to implement
- Category menu
- Two-way conversion
- f-string decimal formatting
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
converter.py— Conversion functions per categoryFACTORS— Dict of unit to factor relative to a base unitapp.py— Category menu, from / to units, formatted output
Build it step by step
- Pick three categories: temperature, length, and weight.
- Convert through a base unit (metre, kilogram) so you avoid n × n formulas.
- Read the value and units, and validate them against the dict keys.
- Print results with f-strings such as f"{value:.3f}".
- Add a reverse-conversion shortcut.
Sample run
Category (1 Temperature, 2 Length, 3 Weight): 1
From (C/F/K): C
To (C/F/K): F
Value: 37
37.000 C = 98.600 F Stretch goals
- Store conversion factors in an Enum
- Load currency rates from a JSON file
- Convert a whole list of values with a comprehension
Interview angle: Why converting through a base unit keeps the code short and easy to extend.
Student Marks Analyser 5–7 hrs
Read marks for a class into lists, compute average/topper, and print a grade sheet.
Features to implement
- Input validation
- Average and rank list
- Pass/fail summary
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
analyser.py— average, highest, lowest, grade(mark), rank listmarks— Dict of student name to mark, or a list of tuplesapp.py— Reads the class and prints the report
Build it step by step
- Read the student count, then fill the names and marks.
- Compute total, average, highest, and lowest with sum(), max(), and min().
- Assign grades with an elif ladder.
- Sort with sorted(items, key=lambda x: x[1], reverse=True) to build the rank list.
- Print a neat table using f-string width specifiers.
Sample run
Name Marks Grade
Asha 92 A
Ravi 78 B
Kiran 55 D
Average: 75.00 Topper: Asha Passed: 3/3 Stretch goals
- Five subjects per student with a nested dict
- Read the class from a CSV file
- Grade histogram drawn with stars
Interview angle: How names and marks stayed aligned while sorting — a dict or a list of tuples, not two separate lists.
ATM Simulator 4–6 hrs
PIN login, balance enquiry, deposit, withdrawal, and a mini statement in a looping console menu.
Features to implement
- Three PIN attempts, then the card is blocked
- Withdrawals in multiples of 100 with a balance check
- Mini statement of the last five transactions
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Atm— balance, pin, failed attempts, last five transactions in a dequeapp.py— Login, menu loop, and exit
Build it step by step
- Ask for the PIN; block the card after three wrong tries.
- Show a menu: balance, deposit, withdraw, mini statement, exit.
- Allow withdrawals only in multiples of 100 and within the balance.
- Record each transaction in deque(maxlen=5) so the oldest drops automatically.
- Add a change-PIN option with confirmation.
Sample run
Enter PIN: ****
1 Balance 2 Deposit 3 Withdraw 4 Mini statement 0 Exit
Choice: 3
Amount: 2550
Amount must be a multiple of 100
Amount: 2500
Please collect your cash. Balance: 7,500.00 Stretch goals
- Several accounts selected by card number
- Daily withdrawal limit
- Note dispensing: count of 500, 200, and 100 notes
Interview angle: How deque(maxlen=5) keeps only the last five entries without manual index math.
Intermediate Projects
Projects that combine strings, dictionaries, files, modules, and clearer modular design — still mostly console, but they feel like real tools.
Text Analyser 6–8 hrs
Analyse a paragraph or file for word count, unique words, and frequency — a warm-up for dict and Counter later.
Features to implement
- Word and sentence counts
- Frequency table
- Case-insensitive option
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
text_stats.py— Counts words, sentences, characters, and vowelsfrequency.py— Word → count dict (manual first, Counter later)app.py— Reads text from the keyboard or a file and prints the report
Build it step by step
- Read the text with input() or Path(file).read_text(encoding="utf-8").
- Lower-case it, remove punctuation with re.sub, and split on whitespace.
- Count sentences by the . ! ? characters.
- Count word frequencies with a dict and print the top five.
- Report the longest word and average word length.
Sample run
Words: 128 Sentences: 9 Characters: 712
Top words: the(11) python(7) is(6) a(5) code(4)
Longest word: encapsulation Average length: 4.6 Stretch goals
- Ignore stop words such as the, a, is
- Estimated reading time
- Common words between two files using set intersection
Interview angle: How words were normalised (case and punctuation) so Python and python count as one word.
Quiz Application 7–9 hrs
Multiple-choice quiz with a question bank, live scoring, and a review screen.
Features to implement
- List-of-dicts question bank
- Score tracking
- Optional JSON-loaded questions
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Question— dataclass with text, four options, correct indexloader.py— Reads questions from questions.jsonQuizEngine— Shuffles, asks, scores, and remembers wrong answersapp.py— Menu and result screen
Build it step by step
- Create the Question dataclass and hard-code five questions.
- Loop through them, read A–D, and keep the score.
- Show a review of wrong answers with the correct option.
- Load questions from a JSON file instead of code.
- Shuffle the order with random.shuffle and add a time limit per quiz.
Sample run
Q3. Which keyword defines a function in Python?
A) func B) def C) lambda D) fn
Your answer: B
Correct! Score: 3/3 Stretch goals
- Categories and difficulty levels
- High-score file with player names
- Negative marking
Interview angle: Why question data (Question) is separated from quiz logic (QuizEngine).
Tic-Tac-Toe (Two Player) 6–8 hrs
Console board game with win/draw detection and invalid-move handling.
Features to implement
- 3×3 board rendering
- Win and draw detection
- Replay option
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Board— 3×3 list of lists; place(), is_full(), render()win_checker.py— Checks rows, columns, and both diagonalsGame— Turn loop, player switching, replay, score
Build it step by step
- Print an empty 3×3 board with row and column numbers.
- Read a move; reject out-of-range or occupied cells.
- Check for a win after each move with loops (or all()), not eight if statements.
- Declare a draw when the board is full.
- Track scores across rounds.
Sample run
X | O | X
---+---+---
| X | O
---+---+---
| | X
Player X wins! Score X: 1 O: 0 Stretch goals
- Single-player mode: win, else block, else random
- N×N board with K in a row
- Unbeatable AI with minimax recursion
Interview angle: How win detection uses loops over rows and columns plus two diagonal checks.
Contact Book (File-Backed) 8–12 hrs
Add/search/list contacts stored in a JSON or CSV file, organised in a small package.
Features to implement
- CRUD-lite operations
- Search by name
- Persist between runs
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Contact— dataclass: name, phone, email with validationrepository.py— Loads and saves contacts.jsonservice.py— Add, search, update, deleteapp.py— Menu (package contacts/)
Build it step by step
- Create a package: models.py, repository.py, service.py, app.py.
- Implement add and list in memory first.
- Save to JSON after every change and load on start.
- Search by partial, case-insensitive name.
- Validate the phone (10 digits) and email with a simple regex.
Sample run
1 Add 2 List 3 Search 4 Delete 0 Exit
Choice: 3
Name contains: ra
Ravi Kumar 9876543210 ravi@mail.com
Rashmi Rao 9123456780 rashmi@mail.com Stretch goals
- Reject duplicate phone numbers
- Sort by name
- Export to vCard format
Interview angle: How file reading and writing stays separate from the menu code (repository layer).
Expense Tracker (CLI) 8–10 hrs
Log daily expenses with categories and show totals by category from a CSV file.
Features to implement
- Append-only log
- Category totals
- Date handling with datetime
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Expense— dataclass: date, category, amount, noteexpense_log.py— Appends to and reads expenses.csv with csv.DictWriter / DictReaderreport.py— Totals by category and by monthapp.py— Menu
Build it step by step
- Fix the CSV format: date,category,amount,note.
- Append one row per expense with open(path, "a", newline="").
- Read all rows and parse amounts with float() or Decimal().
- Print totals per category with a defaultdict.
- Filter by month using the YYYY-MM prefix of the date.
Sample run
Category Total
Food 2,450.00
Travel 1,200.00
Bills 3,800.00
2026-10 total: 7,450.00 Stretch goals
- Monthly budget with an over-budget warning
- Use datetime.date for real date handling
- Bar chart drawn with # characters
Interview angle: How a corrupt CSV row is skipped and reported instead of crashing the program.
Advanced Projects
Design with classes, collections, files, and threads. These look strong on a resume and match typical campus / junior interviews.
Student Record OOP System 10–15 hrs
Manage student objects with encapsulated fields, file persistence, and search/sort helpers.
Features to implement
- Class with validated properties
- Add / display / search / update
- Save and load from JSON
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Student— private _marks via @property; validated setter; __repr__StudentRepository— list[Student] plus save / load to students.jsonStudentService— add, find_by_id, update, delete, sortapp.py— Menu
Build it step by step
- Write Student with __init__, properties, and __repr__.
- Store students in a list and print them.
- Add search by id and update marks.
- Sort by name or marks with sorted(key=...).
- Save to JSON and reload on start.
Sample run
ID Name Marks
1 Asha 92.0
2 Ravi 78.5
Sorted by marks (desc): Asha, Ravi Stretch goals
- dict[int, Student] for O(1) lookup by id
- Custom StudentNotFoundError
- Report card file per student
Interview angle: Why marks use a property with validation instead of a public attribute anyone can overwrite.
Bank Account Hierarchy 12–18 hrs
Base Account with Savings/Current derived types — deposits, withdrawals, and polymorphic statements.
Features to implement
- Inheritance hierarchy
- Overridden interest or display
- Transaction history list
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Account (ABC)— account_no, holder, balance; deposit, withdraw, abstract monthly_interest()SavingsAccount— Interest rate and minimum balance ruleCurrentAccount— Overdraft limit, no interestTransaction— dataclass: type, amount, timestampBank— Accounts by number in a dict, transfer between accounts
Build it step by step
- Create the abstract Account with deposit and withdraw.
- Override withdraw in Savings and Current to enforce their rules.
- Record every operation as a Transaction in a list.
- Print statements polymorphically for all accounts.
- Raise InsufficientFundsError when a rule is broken.
Sample run
SB1001 Asha Savings Balance: 15,000.00
CA2001 Ravi Current Balance: -2,000.00 (overdraft)
Transfer 5,000 SB1001 -> CA2001 ... done
Interest credited to SB1001: 50.00 Stretch goals
- decimal.Decimal for exact money
- PIN-protected login
- Save accounts and transactions to JSON files
Interview angle: How overriding withdraw lets each account type enforce its own rules without if-else on type.
Library Management (OOP) 15–20 hrs
Books, members, and issue/return workflow with overdue fines.
Features to implement
- Issue and return
- Fine calculation
- Search by title/author
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Book— isbn, title, author, availableMember— id, name, borrowed books (limit 3)Loan— book, member, issue date, due dateLibrary— dict[str, Book] by ISBN; issue, return, fines
Build it step by step
- Model Book and Member with encapsulated attributes.
- Store books in a dict keyed by ISBN.
- Issue: check availability and the member limit, then create a Loan.
- Return: compute days late with datetime.date and charge a fine.
- Search by title or author; save everything to JSON files.
Sample run
Issue 978-0134685991 to M01 ... issued, due 2026-10-23
Return 978-0134685991 on 2026-10-26 ... 3 days late, fine Rs 15
Search author "martin": Clean Code (available) Stretch goals
- Reservation queue per book with collections.deque
- Most-borrowed books report
- Admin and member roles
Interview angle: Why a dict keyed by ISBN beats scanning a list for every lookup.
Shape Area Toolkit 8–12 hrs
Abstract Shape (ABC) with Circle/Rectangle overrides — classic polymorphism demo.
Features to implement
- Abstract area/perimeter
- List of Shape objects
- Magic methods for ordering and repr
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Shape (ABC)— abstract area() and perimeter(); describe()Circle, Rectangle, Triangle— Override area and perimeter; validate in __init____lt__ / __repr__— Magic methods so shapes sort by area and print nicelyapp.py— Builds a list of shapes and prints totals
Build it step by step
- Write the abstract Shape class with @abstractmethod.
- Implement three subclasses with constructor validation.
- Store mixed shapes in one list.
- Print each area polymorphically and the total.
- Sort shapes by area with sorted(shapes) using __lt__ or key=lambda.
Sample run
Circle(r=2.0) area 12.57 perimeter 12.57
Rectangle(3.0x4.0) area 12.00 perimeter 14.00
Triangle(3,4,5) area 6.00 perimeter 12.00
Largest: Circle Stretch goals
- Square extends Rectangle — discuss why it can break expectations
- Read shapes from a JSON file
- Rewrite with dataclasses and typing.Protocol
Interview angle: Show dynamic dispatch: a Shape variable calling Circle.area() at runtime — and why Shape() itself cannot be created.
Employee Payroll System 12–16 hrs
Full-time and contract employees with different pay rules under one abstract base.
Features to implement
- Polymorphic pay()
- Class-level employee counter
- Report printing
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Employee (ABC)— id, name; class-level counter for ids; abstract pay()FullTimeEmployee— Monthly salary + allowances − taxContractEmployee— Hourly rate × hours workedPayroll— List of employees, report printing
Build it step by step
- Define the abstract Employee with an abstract pay().
- Implement two employee types with their own pay rules.
- Generate ids with a class attribute counter or itertools.count.
- Print payslips sorted by pay.
- Show department totals with a defaultdict.
Sample run
E1 Asha Full-time Pay: 58,500.00
E2 Ravi Contract Pay: 32,000.00 (160 hrs x 200)
Total payroll: 90,500.00 Employees: 2 Stretch goals
- Intern type with a fixed stipend
- Payslip file per employee
- Tax slabs loaded from a config file
Interview angle: Why adding a new employee type needs no change in Payroll (open for extension).
Word Frequency & Unique Vocab 8–12 hrs
Count word frequencies with dict/Counter and unique words with a set; optional top-N report.
Features to implement
- Normalise case/punctuation with regex
- Frequency map
- Unique-word set
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
text_cleaner.py— Lower-cases words and strips punctuation with re.findallWordCounter— Counter for counts and a set for unique wordsapp.py— Reads a file and prints the top N
Build it step by step
- Read the file with Path.read_text or iterate it line by line.
- Find words with re.findall(r"[a-z']+", line.lower()).
- Count with collections.Counter (and a plain dict version first).
- Collect unique words in a set (and sorted(set) for ordered output).
- Print the top N with counter.most_common(n).
Sample run
Total words: 5,214 Unique: 1,032
Top 5: the=312 and=190 python=144 to=121 of=117 Stretch goals
- Stop-word list loaded from a file
- Two-word phrase (bigram) counts
- Compare the vocabulary of two files with set operations
Interview angle: Complexity: O(n) to count, plus O(u log u) to sort the u unique words.
Expression Calculator (Stack) 10–14 hrs
Evaluate infix or postfix expressions using a stack and string parsing.
Features to implement
- Tokenise input
- Operator precedence or postfix eval
- Error messages via exceptions
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
tokenizer.py— Splits input into numbers, operators, and brackets with a regexinfix_to_postfix.py— Shunting-yard algorithm with an operator stack (a list)postfix_evaluator.py— Evaluates with a value stackapp.py— Reads expressions until exit
Build it step by step
- Tokenise 3 + 4 * (2 - 1) into separate tokens.
- Convert infix to postfix using operator precedence.
- Evaluate the postfix with a list used as a stack (append / pop).
- Report mismatched brackets and division by zero with exceptions.
- Support multi-digit and decimal numbers.
Sample run
> 3 + 4 * (2 - 1)
Postfix: 3 4 2 1 - * +
Result: 7.0
> (5 + 2
Error: mismatched brackets Stretch goals
- Power operator with right associativity
- Variables such as x = 5
- Unary minus
Interview angle: Walk through how the operator stack enforces precedence — and why you should not use eval().
Task Queue + Worker Thread 10–14 hrs
Enqueue jobs on a queue and process them on a background thread with a safe hand-off.
Features to implement
- Producer menu on the main thread
- Worker thread consumes jobs
- Graceful shutdown / join
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Task— dataclass: id, description, simulated durationqueue.Queue— Thread-safe FIFO from the standard libraryWorker (Thread)— Takes tasks and processes them in run()app.py— Menu that adds tasks and requests shutdown
Build it step by step
- Create Task and a shared queue.Queue.
- Start a worker thread that loops on queue.get().
- Add tasks from the main-thread menu.
- Stop the worker cleanly with a sentinel (None) task.
- join() the worker and print a summary.
Sample run
[main] added Task#1 resize-images
[worker] started Task#1
[main] added Task#2 send-emails
[worker] finished Task#1 in 1.2s
[main] shutdown requested ... worker joined, 2 tasks done Stretch goals
- Several workers with ThreadPoolExecutor
- Priorities with queue.PriorityQueue
- Retry failed tasks
Interview angle: Why queue.Queue removes the need for manual locks and conditions — and what the GIL does and does not protect.
Inventory Management System 12–16 hrs
Products, stock levels, suppliers, and low-stock alerts with sorting, search, and file persistence.
Features to implement
- Add, update, and remove products
- Low-stock and out-of-stock report
- Sort by name, price, or quantity
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Product— sku, name, price, quantity, reorder levelSupplier— id, name, contact, products suppliedInventory— dict[str, Product] by SKU; stock in / outreport.py— Low-stock, valuation, and sorted lists with comprehensionsapp.py— Menu and file persistence
Build it step by step
- Model Product with validation (no negative price or stock).
- Store products in a dict keyed by SKU.
- Implement stock in and stock out; raise OutOfStockError.
- Low-stock report: quantity at or below the reorder level.
- Sort with key=lambda and save to CSV or JSON.
Sample run
SKU Name Qty Price
P101 USB Cable 4 199.00 LOW STOCK
P102 Keyboard 25 899.00
P103 Mouse 0 499.00 OUT OF STOCK
Stock value: 26,919.00 Stretch goals
- Purchase orders generated for low-stock items
- Sales history with daily totals
- Barcode-style SKU validation with regex
Interview angle: How comprehensions and sum() produced the low-stock and valuation reports in a few lines.
Parking Lot System (LLD) 12–18 hrs
The classic low-level design interview problem: levels, spots by vehicle size, tickets, and fees on exit.
Features to implement
- Spot allocation by vehicle type
- Ticket with entry time
- Hourly fee calculation on exit
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Vehicle (ABC)— number, size; Bike, Car, Truck subclassesParkingSpot— id, size, occupied vehicleLevel— Free spots per size — dict[Size, deque[ParkingSpot]]Ticket— id, vehicle, spot, entry timeFeeStrategy (ABC)— Hourly or flat pricingParkingLot— park(), leave(), availability
Build it step by step
- Draw the class diagram before writing code.
- Allocate the nearest free spot that fits the vehicle size.
- Issue a ticket with the entry time from datetime.now().
- On exit, free the spot and compute the fee with a FeeStrategy.
- Show availability per level; raise ParkingFullError when the lot is full.
Sample run
Park KA01AB1234 (Car) ... Level 1, Spot C07, Ticket T1001
Park KA02CD5678 (Truck) ... Lot full for trucks
Exit T1001 after 2h 40m ... Fee Rs 60
Level 1 free: Bike 10, Car 23, Truck 2 Stretch goals
- Multiple entry and exit gates
- Reservations
- Electric-charging spots
Interview angle: Justify each class and abstract base — this is exactly how LLD rounds are scored.
Capstone / Portfolio Projects
Larger builds that combine OOP, collections, files, and concurrency. One done well beats ten tiny demos.
Mini Console Game 20–30 hrs
Turn-based or simple grid game with entity classes, list/dict state, and save/load.
Features to implement
- Entity hierarchy
- Game loop
- Save game to JSON
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Entity (ABC)— name, hp, position; abstract act()Player, Enemy, Item— Subclasses with their own behaviourGameMap— List-of-lists grid and movement rulesGameState— Entities, score, level; save / load as JSONgame_loop.py— Read input, update, render
Build it step by step
- Draw a small grid and move the player with W, A, S, D.
- Add enemies that move each turn and items to collect.
- Give every entity an act() method (polymorphism).
- Save and load the game state with json.dump / json.load.
- Add levels and a high-score table.
Sample run
#########
#P..*...#
#..E....#
#.....*.#
#########
HP: 10 Score: 20 Move (w/a/s/d): d Stretch goals
- Enemy path-finding with BFS and deque
- Inventory stored in a dict
- Colour output with ANSI codes
Interview angle: How the game loop separates input, update, and render.
Personal Finance Manager 20–28 hrs
Accounts, transactions, categories, monthly reports — strong OOP + dict/list showcase.
Features to implement
- Multiple accounts
- Category totals
- Export report
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Account— name, type, balanceTransaction— dataclass: date, amount, category, accountLedger— list of Transaction and dict of Accountreports.py— Monthly and category reports with defaultdict and comprehensionsstorage.py— CSV import and exportapp.py— Menu (package finance/)
Build it step by step
- Model accounts and transactions in separate modules.
- Record income and expenses, updating balances.
- Monthly report grouped by category with defaultdict(float).
- Budgets per category with warnings when exceeded.
- Export reports to CSV and import a bank statement.
Sample run
October 2026 Income 85,000 Expense 41,250
Rent 20,000 ##########
Food 8,400 ####
Travel 4,850 ##
Savings rate: 51% Stretch goals
- Recurring transactions
- Password-protected data file
- Charts with matplotlib
Interview angle: Show how defaultdict and sum() built the monthly report.
Notes CLI with Tags 18–25 hrs
Create, list, search, and tag notes stored as files with an in-memory dict/set index.
Features to implement
- Tag search with sets
- Full-text naive search
- Commands via argparse and sys.argv
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Note— dataclass: id, title, body, tags, createdNoteStore— One file per note inside notes/ using pathlibTagIndex— dict[str, set[int]] — tag to note idscli.py— Parses commands with argparse
Build it step by step
- Support add, list, show, and delete commands with argparse sub-commands.
- Save each note as a file and rebuild the index on start.
- Index tags in a dict of sets.
- Search by tag and by text.
- List notes by date with a simple pager (a generator that yields pages).
Sample run
$ python -m notes add "Exam prep" --tags python,oop
Saved note #12
$ python -m notes tag python
#7 Decorators cheatsheet [python]
#12 Exam prep [python, oop] Stretch goals
- Edit notes in place
- AND search across tags (python + oop) with set intersection
- Export all notes to Markdown
Interview angle: Why a dict of sets makes tag search fast.
Concurrent Download Simulator 16–22 hrs
Simulate several “downloads” on worker threads, track progress in a shared dict, and print a live status line.
Features to implement
- Thread per job or a small pool
- Lock-protected progress dict
- Join all workers before summary
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Download— name, size, progress; run() simulates the workProgressTracker— dict of percentages guarded by threading.LockDownloader— ThreadPoolExecutor that runs the downloadsStatusPrinter— Prints a status line every 500 ms
Build it step by step
- Simulate a download with a loop and time.sleep.
- Run several downloads in a ThreadPoolExecutor.
- Update progress inside with lock: so writes never race.
- Print the status from a separate thread or a loop on the main thread.
- Wait for all futures and print a summary.
Sample run
file1.zip [##########] 100% file2.iso [######----] 60% file3.mp4 [###-------] 30%
...
All 3 downloads finished in 6.4s Stretch goals
- Pause and resume with threading.Event
- Random failures with retry
- Rewrite the same app with asyncio and compare
Interview angle: Why a lock guards the shared dict, and when asyncio is a better fit than threads.
Hotel Room Booking System 22–30 hrs
Rooms, customers, and bookings with date ranges, cancellations, invoices, and saved data — a complete business app.
Features to implement
- Availability search by check-in and check-out dates
- Double-booking prevention
- Invoice with taxes and cancellation rules
Concepts required
Build guide — modules, steps & sample run
Suggested modules & classes
Room (ABC)— number, base price; Standard, Deluxe, Suite subclassesCustomer— id, name, phoneBooking— room, customer, check-in, check-out, statusBookingService— Availability by date range, book, cancelInvoiceService— Nights × rate + taxes − discountsapp.py— Menu and file persistence
Build it step by step
- Model room types with inheritance and their own pricing.
- Check availability: two bookings overlap if start1 < end2 and start2 < end1.
- Create bookings and reject overlaps with a BookingConflictError.
- Cancellation rules and a printed invoice.
- Persist rooms, customers, and bookings in JSON files.
Sample run
Search 2026-12-24 to 2026-12-27 ... Deluxe 201, Suite 301 free
Book 201 for C12 ... Booking B5001 confirmed (3 nights)
Invoice B5001: 3 x 4,500 = 13,500 + 12% GST = 15,120.00 Stretch goals
- Seasonal pricing
- Room service charges on the bill
- Occupancy report per month
Interview angle: Explain the date-overlap check and how double booking is prevented.
How to Build Any of These
| Step | What to do |
|---|---|
| 1. Plan on paper | List features and the functions/classes/data structures each one needs before you type a line. |
| 2. Design types first | Sketch classes and which collection owns the data. Prefer list and dict defaults; reach for dataclasses. |
| 3. Build one feature at a time | Get “add a record” working completely before “delete” or “search”. |
| 4. Encapsulate and validate | Keep attributes private by convention. Reject bad input at the edges with exceptions or clear messages. |
| 5. Isolate with a virtual environment | Create a .venv, pip install what you need, and freeze requirements.txt. Run with python -m and follow PEP 8. |
| 6. Test edge cases | Empty lists, missing files, bad input(), and concurrent access if you use threads. Automate them with pytest. |
| 7. Close files with with-blocks | Do not leak file handles. Catch exceptions such as FileNotFoundError at the boundary. |
| 8. Write a README and push it | Explain how to create the venv and run it, the features, and one screenshot of it running. |
Pair this page with Day 30 of the learning plan, the cheatsheet, and interview Q&A while you build.
Project Structure & README Template
Recommended folder layout
bank-app/
├── README.md
├── requirements.txt # pytest, etc. (pip freeze > requirements.txt)
├── pytest.ini # pythonpath = src
├── .gitignore # .venv/, __pycache__/, data/*.json
├── .venv/ # virtual environment (never commit)
├── data/
│ └── accounts.json
├── src/
│ └── bank/
│ ├── __init__.py
│ ├── app.py # main() + menu only
│ ├── models.py # Account, SavingsAccount (dataclasses / ABC)
│ ├── services.py # business rules
│ ├── repository.py # JSON load / save with pathlib
│ └── exceptions.py # InsufficientFundsError
└── tests/
└── test_services.py # pytest tests
# create the environment and run (Linux / macOS)
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
PYTHONPATH=src python -m bank.app
pytest
# create the environment and run (Windows PowerShell)
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -r requirements.txt
$env:PYTHONPATH = "src"; python -m bank.app
pytest README.md template
# Bank Account System (Python)
Console banking app with savings and current accounts, transfers,
and statements saved to JSON.
## Features
- Create savings / current accounts
- Deposit, withdraw, transfer with validation
- Monthly interest for savings accounts
- Data saved to data/accounts.json
## Concepts used
OOP (ABC, inheritance, polymorphism), dataclasses, list and dict,
custom exceptions, pathlib, with open, pytest
## How to run
python -m venv .venv
.venv\Scripts\Activate.ps1 (Windows) | source .venv/bin/activate (Linux / macOS)
pip install -r requirements.txt
PYTHONPATH=src python -m bank.app
## Run the tests
pytest
## Sample run
(paste 10-15 lines of real console output or a screenshot)
## What I learned / next steps
- Why withdraw is overridden per account type
- Next: type hints with mypy, a SQLite backend, and a FastAPI layer
Keep main() thin: it should only create objects and run the menu. Business rules go in
service modules, data in model classes, and file code in repository modules — the same layering used
in real FastAPI and Django applications.
Quality Checklist & Common Mistakes
What reviewers look for
| Area | Check |
|---|---|
| Structure | Modules by role (models, services, repository, app); one class, one job; src/ and tests/ folders |
| Encapsulation | Leading-underscore attributes, @property with validation, no shared mutable global state |
| Input handling | Bad input never crashes the program; clear messages and retry |
| Exceptions | Specific exceptions, custom ones for business rules, no bare except: blocks |
| Collections | The right structure for the job (dict for lookups, list for order, set for uniqueness) |
| Files | with open() or pathlib, explicit encoding, data survives restarts, corrupt lines handled |
| Naming | snake_case functions, CamelCase classes, no single-letter names outside loops (PEP 8) |
| Readability | Short functions, no duplicated code, constants instead of magic numbers, type hints and docstrings |
| Testing | pytest tests for edge cases: empty data, zero, negatives, very large values |
| Presentation | README with features, run steps, sample output; requirements.txt; clean Git history |
Mistakes to avoid
| Mistake | Fix |
|---|---|
| Everything at module level | Move logic into functions and classes; guard the entry point with if __name__ == "__main__" |
| Public attributes everywhere | Use _private names and @property so rules are enforced in one place |
| Copy-pasted blocks for each option | Extract functions; use a dict dispatch or polymorphism instead of long if-elif chains on type |
| Crashing on letters typed instead of numbers | Wrap int() / float() in try/except ValueError and ask again |
| Mutable default arguments | Use None as the default and create the list or dict inside the function |
| Using float for money | Use decimal.Decimal or store paise / cents as an int |
| Files left open | Always use with open(...) or Path.read_text / write_text |
| Bare except: or swallowing errors | Catch specific exceptions and log or re-raise them |
| Installing packages globally | Create a .venv per project and keep requirements.txt up to date |
| Huge first version | Build one feature end to end, then add the next |
| No README | Recruiters skip repositories they cannot understand in 30 seconds |
Questions Interviewers Ask About Your Project
- Walk me through your project in two minutes — the problem, the features, and your role.
- Draw the main classes and explain why each one exists.
- Why did you choose this data structure (list, dict, set, deque) for this data?
- Where did you use inheritance, abstract base classes, or polymorphism, and why?
- How do you handle invalid input and failures such as a missing file?
- What was the hardest bug, and how did you find and fix it?
- What is the time complexity of your search, add, and delete operations?
- If 1,000 users used it at once, what would break and how would you fix it?
- How would you test it with pytest? Which cases would you automate first?
- What would you add or change if you had another week?
Prepare a two-minute explanation and a class diagram for every project on your resume. Each build guide above ends with the interview angle most likely to come up for that project.
Level Up a Finished Project
Once a console version works, upgrade the same project instead of starting a new one — it shows growth and turns a student exercise into a portfolio piece.
| Upgrade | Learn | Example |
|---|---|---|
| Unit tests | pytest, fixtures, and parametrize | Test BankService.withdraw for overdraft and insufficient-balance rules |
| Packaging | pyproject.toml and pip install -e . | Install your app as a command and manage dependencies properly |
| Database | sqlite3, then SQLAlchemy with PostgreSQL | Replace JSON files with tables and SQL queries |
| Desktop GUI | Tkinter or PyQt | Forms and tables instead of a console menu |
| REST API | FastAPI or Flask | Expose accounts as /api/accounts endpoints for a web or mobile app |
| Logging and typing | logging module and mypy | Replace print debugging with log levels and add type hints |
| Version control | Git and GitHub | Small commits with clear messages and a public repository |