AssignmentsWeek 02 · Organizing dataScholarship tracker (CLI)
wk02.mp2Week 02 · Organizing dataOpen · due in 2 weeks

Scholarship tracker (CLI)

A command-line tracker that adds, lists, filters, and saves scholarships. Lists of dictionaries, files, and your first piece of persistence.

What you'll build

A command-line tracker that adds, lists, filters, and saves scholarships. Lists of dictionaries, files, and your first piece of persistence.

Requirements

The must-do parts. If any are missing, we'll ask you to take another pass.

  1. Lets the user add a scholarship with name, country, deadline, funding type, and status.
  2. Lists all scholarships in a readable way (one per line, columns aligned).
  3. Supports filtering by country and by funding type.
  4. Saves the list to a file on exit, and loads it back on the next run.
  5. Uses functions to separate concerns — no 80-line if/else chains.
Bonus, if you're feeling brave
  • Sort by deadline.
  • Warn when a deadline is within 14 days.
  • Export to CSV with the csv module.

Examples

What your program should look like when it runs. Lines starting with $ are typed by you; the rest is your program.

Example 1 — happy path
$ python tracker.py
PySprout scholarship tracker

  1. Add a scholarship
  2. List all
  3. Filter by country
  4. Filter by funding
  q. Save and quit

> 1
Name: Mastercard Foundation Scholars
Country: Multiple
Deadline: 2026-09-30
Funding: Full
Status: applying

Saved.

Where to start

Copy this scaffold into a new file. You don't have to use it — it's just a friendly nudge.

tracker.py
import json
from pathlib import Path

DATA_FILE = Path("scholarships.json")

def load() -> list[dict]:
    if DATA_FILE.exists():
        return json.loads(DATA_FILE.read_text())
    return []

def save(items: list[dict]) -> None:
    DATA_FILE.write_text(json.dumps(items, indent=2))

def menu() -> None:
    # TODO: print a menu, dispatch to add/list/filter/quit
    pass

if __name__ == "__main__":
    menu()

How we'll grade it

Four checks, four points. Three or above is passing — we'll ask you to revise anything we can't tick.

CheckWhat we look forPt
It runsStarts cleanly. Drops you into the menu. Quits when asked.1
PersistsSurvives a restart — scholarships I add today are there tomorrow.1
Clean structureEach user action lives in its own function. No file is over ~120 lines.1
ReflectionYour note tells us what you would do differently next time.1
Ready?
Hand it in
You can submit a draft and revise later if you're not done.
Begin submission →