Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

13th-2-2026

Budget App (FreeCodeCamp – Python OOP, class and Objects)

Overview

This project implements a simple budget management system using Object-Oriented Programming (OOP) in Python. It allows users to create spending categories, track deposits and withdrawals, transfer funds between categories, and generate a visual chart showing spending distribution.

This project reinforces:

  • Class design and encapsulation
  • State management using object attributes
  • String formatting and precise output control

Features

Category Class

Each budget category:

  • Stores transactions in a ledger

  • Tracks balance automatically

  • Supports:

    • Deposits
    • Withdrawals (with balance checks)
    • Transfers between categories
    • Clean, formatted string output

Spending Chart

  • Displays percentage spent per category
  • Percentages are rounded down to the nearest 10
  • Output is an ASCII bar chart with exact spacing (as required by FreeCodeCamp)

Key Concepts Practiced

  • Classes and objects
  • Encapsulation of data and behavior
  • Method reuse (transfer uses withdraw + deposit)
  • Iteration and aggregation
  • Precise string formatting and alignment

How to Run

python budget_app.py

Make sure the following block is at the file level:

if __name__ == "__main__":
    main()

Notes

  • Output formatting (including spaces) is intentional and required
  • The project is designed to match FreeCodeCamp’s automated tests exactly

This project focuses on thinking in systems, not just writing code.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages