LearnFrenzy
Sign in Take a free test

Python · Guided project

Build a Command-Line Expense Tracker — Guided Project

A small program that records daily expenses in a CSV file and shows totals by category — the kind of project you can explain confidently in an interview.

  • Beginner
  • ~4 hours
  • 5 steps

The brief

Hostel life, monthly budgets, splitting bills with roommates — everyone has a reason to track expenses. In this project you build a terminal app that saves each expense to a CSV file and summarises spending by category. It uses everything from the Python track: input, conditions, loops, functions, dictionaries, files and error handling.

What you will submit: a GitHub repository with the code, a sample expenses.csv and a short README with a screenshot of the program running.

Skills you will use: Functions · Dictionaries · CSV files · Error handling

Build it

Step by step

Tick each step as you finish it. 0 of 5 done.

  1. Step 1Plan the data

    Decide the columns: date, item, category, amount. Write two sample rows by hand in expenses.csv.

  2. Step 2Add an expense

    Write add_expense() that asks for item, category and amount, rejects invalid amounts with try / except, and appends a row.

  3. Step 3Show a summary

    Write show_summary() that reads the CSV and prints the total and the total per category using a dictionary.

  4. Step 4Build the menu

    Add a loop with options: 1 Add, 2 Summary, 3 Exit. Handle wrong menu choices politely.

  5. Step 5Polish and publish

    Format money with two decimals, write a README with how to run it, and push the project to GitHub.

Self-review before you call it done

Tick each point once your project really meets it. These are the things an interviewer will look for.

0 / 5 checked

Check all 5 points, then mark the project as finished.

Next

More guided projects

Search LearnFrenzy

Esc

Quick links