STR Coding Club logo STR Coding ClubLearn to code, together
Club Projects

Build a Python Budget Tracker as a Club Group Project

Most club projects fall apart for one of two reasons: the beginners have nothing they can finish alone, or the confident coders get bored waiting for everyone else.

Students around a classroom table with laptops showing a terminal budget program, sticky notes with function names stuck on a whiteboard behind them

Most club projects fall apart for one of two reasons: the beginners have nothing they can finish alone, or the confident coders get bored waiting for everyone else. A Python budget tracker avoids both problems because it splits naturally into small, separate jobs, and every member ends up with a tool they can actually use for their pocket money or first paycheck.

I have run this project with three different groups, ranging from 12-year-olds to adults returning to learning. It fits into four sessions of 90 minutes, needs nothing beyond plain Python, and leaves room for stretch goals so the fast finishers stay busy.

What the Python budget tracker does

Keep the scope small and clear. The finished program runs in the terminal and lets a user do five things.

  • Add an expense or income with an amount, a category and a short note.
  • List every entry, newest first.
  • Show the total spent per category, such as food, travel or games.
  • Show the balance: income minus spending.
  • Save everything to a CSV file so the data survives when the program closes.

That is it. No graphs, no logins, no web pages in the core version. Writing this list on the whiteboard in the first session matters more than any code, because it is the contract every subgroup builds against.

Splitting the work by skill level

The trick is to give each group a function with a clearly defined input and output. If everyone agrees that an entry is a dictionary with the keys "amount", "category", "note" and "kind", the groups can work in parallel without reading each other's code.

JobSuitsWhat it returns
Input and validationComplete beginners in pairsOne clean entry dictionary
Category totalsMembers who know loopsA dictionary of category to total
Balance and listingMembers who know loops and sortingA number and a printed list
Save and load CSVConfident membersA list of entries from the file
Menu and glue codeA mentor plus one keen memberThe running program

The beginners' job sounds small but teaches a lot. Asking for an amount, rejecting "ten pounds" or a negative number, and repeating the question until the input is valid covers input, conversion with float, try and except, and while loops in one tidy function. If your members need a warm-up first, the six beginner function exercises are a good session zero.

Agree on test data before anyone codes

Write ten sample entries on the board and turn them into a shared list at the top of a file. For example: income of 40 for "pocket money", 6.50 on "food" for lunch, 12 on "games" for an expansion, 3.20 on "travel" for a bus fare. Every group tests against the same list, so when the pieces join up the numbers already match. Groups that skip this step usually spend session four arguing about why the totals differ.

A four-session plan

Session one, 90 minutes. Demo a finished tracker for five minutes so everyone sees the goal. Agree the entry format, write the test data together and form groups. Each group writes its function name and a one-line description on a sticky note and puts it on the wall. Beginners start on input prompts.

Session two. Groups build and test their function in isolation using the sample data. Mentors circulate with one rule: ask a question before giving an answer. The category group usually finishes first; give them the stretch goal of sorting categories by total, highest first.

Session three. The CSV group shares save and load functions. The menu group starts joining pieces together, calling each function in turn. Expect bugs at the joins, typically a string amount where a float was expected. Those bugs are the best teaching moment of the whole project, because they show why the shared format mattered.

Session four. Full program runs. Each group demos its part to the room, then everyone runs the tracker on their own laptop and adds three real entries. Finish by listing stretch goals on the board for anyone who wants to keep going at home.

If you have more than four sessions, our guide to planning a six week coding club project shows how to add a polish week and a demo day without losing momentum.

Why I do not start with classes or a GUI

A common suggestion is to build the tracker "properly" with an Expense class and a graphical window from day one, because that is how real software looks. For a mixed club, I think that is a mistake.

Classes add a layer of vocabulary, self, constructors, methods, before anyone has seen why grouping data helps. In my first run I tried it, and the beginners spent a whole session copying class syntax they did not understand while the confident members rewrote it three times. Plain dictionaries and functions let every member read every line of the finished program, which is the point of a club project.

A GUI library has the same problem with more setup. Installing it on school laptops alone can eat 30 minutes. Once the terminal version works, converting it to a class or adding a simple window becomes a great follow-up project, because members can now see exactly what the extra structure buys them.

Stretch goals for fast finishers

  • Add a monthly limit per category and print a warning when spending passes 80 percent of it.
  • Filter entries by date range, which introduces the datetime module.
  • Export a summary report to a text file with neat aligned columns using f-string formatting.
  • Add an "undo last entry" option.
  • Draw a bar chart in the terminal using rows of hash characters scaled to each category total.

Members who enjoyed the data side of this project often like the lending tracker group project next, since it reuses the same CSV and dictionary skills with a different problem.

Common snags and quick fixes

Three bugs turn up in nearly every group. Floats print as 9.700000000000001, which is fixed by formatting with two decimal places. The CSV file is saved in a different folder from the script, so loading finds nothing; print the working directory to show members where Python is looking. And category names fail to match because one entry says "Food" and another says "food"; convert to lowercase on input.

Each of these makes a good five-minute group explanation, and each one teaches a habit that matters in larger programs.

Frequently asked questions

How long does it take beginners to build a Python budget tracker?

In a group, around four sessions of 90 minutes produces a working terminal version. A single beginner working alone usually needs eight to ten hours spread over a couple of weeks. The group version is faster because each person focuses on one function.

What Python skills does a budget tracker teach?

It covers input and validation, loops, dictionaries, functions and reading and writing CSV files. Stretch goals add dates, formatting and sorting. That spread makes it a strong second or third project after members finish simple exercises.

Do club members need to install anything extra?

No. The core project uses only the standard library, including the csv module that ships with Python. Any laptop that can run Python 3 and a basic editor is enough, which keeps setup time close to zero.

BN
Bartholomew Ng

Bartholomew taught maths for years before switching to teaching Python. He writes about the basics of the language and about teaching code without drowning learners in syntax.

More posts by Bartholomew

More in Club Projects

01doorganico 084goad 3hot8 4465456 after5internprogram ahandfulofblessings ahmadpc ahomcybersecurity allodialresources annodex antiquesandperiodcollectibles aotc asianworldkashmir beedlectrics bloggertemplatefree bluefeatheragency bodyweightsolution campaign08blog carfixadvisor catstreetcollective cbstvsports cnfanspurchasing committeeof500yearsofdignityandresistance covertopsdjs cs-kaiyuangame cuestacomunicaciontotal cxoutlet dancebetgame deskgearhub destinyvillastay detectmagazine di33 diamondsteelbuildings donmo dyanadropship emarsysfinance emimattl escapechan eskitarih evautoplay everythingweddings-orlando farmzone feedviewerapp foxstudiosscratch gamevui123 gleasongrade greetingsday hacklabasu haskell iw-kaiyun jagoanproperti jilidskripsi joltbusinessfinance juegodepokergratis juegospucca kaeru-festival latestmehndidesigns lestanzediottaviano litemagazines localcommunityhero lustrsazan mariashebets menswheels newwebstechs1 nikkit ootheday oxigenvpn plurfitness prefetial probudgetcarpetcleaning psychicmrsmartin pyaten qvantor rejoignezlogis rexzbot riselayouts ruchin rwxqsgd5 sakaltime shibiaowang shop-bot skrtips spotlesshaven tetapatrium topselller uneplanteartificielle vipertechcr webtech1223411 wo-kygaming yamaha-mekar yeknava yoybuysheets zenunwa yamaha-mekar jilidskripsi ankertoto ankertoto ankertoto