0% found this document useful (0 votes)
52 views9 pages

Python Project

Uploaded by

tayalprachi2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views9 pages

Python Project

Uploaded by

tayalprachi2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

PYTHON PROJECT

BUDGET TRACKER

PRESENTED BY: PRESENTED TO:


PRACHI TAYAL (MBAN1MG24036) Ms. SHRUTI GHATGE
TEENA PATHAK (MBAN1MG24062)
SNEHA SHRIVASTAVA (MBAN1MG24057)
NEHA GURWANI (MBAN1MG24033)
JATIN KUSHWAH (MBAN1MG24020)
HARSH KALIJANG (MBAN1MG24014)
INTRODUCTION
A budget tracker is a tool that helps you monitor your income and
expenses.

It allows you to keep track of your spending habits, set financial


goals, and make informed decisions about your money.

Key Features of a Budget Tracker:

 Income Tracking: You can record all your income sources,


such as salary, freelance work, or investment returns.
 Expense Tracking: You can categorize your expenses (e.g.,
rent, food, transportation, entertainment) and track how much
you spend in each category.
 Budgeting: You can set spending limits for different categories
to help you stick to your budget.
 Savings Goals: You can set savings goals and track your
progress towards them.
 Financial Reports: You can generate reports to analyze your
spending habits and identify areas where you can save money.

Types of Budget Trackers:

 Spreadsheet-Based Trackers: You can create your own budget


tracker using spreadsheet software like Microsoft Excel or
Google Sheets.
 Mobile Apps: There are many budgeting apps available for
smartphones and tablets. These apps often offer features like
automatic categorization of expenses, personalized financial
advice, and community forums.
 Online Tools: Many websites offer free or paid budgeting tools
that allow you to track your finances online.

By using a budget tracker, you can gain a better understanding of your


financial situation, make informed decisions about your money, and
achieve your financial goals.
PROJECT COMPONENTS
Here's a breakdown of the core Python components you'll need to build a robust
budget tracker:

1. Data Structures:

 Dictionaries:
o To store income and expense categories with their corresponding
amounts.
o Example: income = {'salary': 3000, 'freelance':
500}
 Lists:
o To store a list of transactions, each represented as a dictionary.
o Example: transactions = [{'date': '2023-11-25',
'category': 'food', 'amount': 20}, {'date':
'2023-11-26', 'category': 'rent', 'amount':
800}]

2. Input/Output Operations:

 User Interface:
o Text-Based: Use input() and print() functions for simple
interactions.
o Graphical User Interface (GUI): Employ libraries like Tkinter or
PyQt for more user-friendly interfaces.

3. Data Processing and Analysis:

 Calculations:
o Calculate total income, total expenses, and remaining balance.
o Calculate average spending per category.
o Identify spending trends over time.
 Data Visualization:
o Visualize income and expense trends, category-wise spending, and
savings progress.

4. Core Functionality:

 Add/Edit Transactions:
o Allow users to add or edit transactions with details like date,
category, and amount.
 Categorize Expenses:
o Implement a categorization system for expenses (e.g., food,
housing, transportation).
 Set Budgets:
o Allow users to set monthly or yearly budget limits for different
categories.
 Generate Reports:
o Generate detailed reports on income, expenses, savings, and
spending trends.

SOURCE CODE
class BudgetTracker:
users=[]
def __init__(self,name,income):
self.totalbal = income
self.expense = {}
print("user created successfully")

def addExpense(self,title,amount):
self.totalbal-=amount
self.expense.update({title:amount})
print("expense added successfully")
print("remaining balance:",self.totalbal)

def addBalance(self,income):
self.totalbal+=income
self.currentBalance()

def currentBalance(self):
print("Current balance:",self.totalbal)

def allExpenses(self):
totalAmount=0
for title,amount in self.expense.items():
print(title ,":",amount)
totalAmount += amount
print("total expense is:",totalAmount)
if __name__=="__main__":
flg=1
while(flg):
print("""
1. create user
2. add expense
3. add Balalce
4. current Balance
5. See your all expenses
6. exit """)
button = int(input("Select option.. "))
if button == 1:
name = input("Enter your name: ")
income = int(input("Enter your income: "))
user = BudgetTracker(name,income)
BudgetTracker.users.append(user)
elif button ==2:
title = input("Enter title of the expense: ")
amount = int(input("Enter amount: "))
user.addExpense(title,amount)

elif button ==3:


amount = int(input("Enter amount to add: "))
user.addBalance(amount)
elif button == 4:
user.currentBalance()
elif button ==5:
user.allExpenses()
elif button == 6:
print("Thanks for using Budget Tracker: ")
flg=0
else:
print("not available option!")
input("press any key..")
OUTPUT
CODE EXPLANATION
1. Data Structures:
o income is a dictionary to store income sources and amounts.
o expenses is a list to store expense categories and amounts.
2. Functions:
o add_income: Adds a new income source and amount to the
income dictionary.
o add_expense: Adds a new expense category and amount to the
expenses list.
o calculate_balance: Calculates the total income, total
expenses, and the remaining balance.
3. Main Loop:
o The main() function provides a menu-driven interface.
o Users can choose to add income, add expenses, view the balance,
or exit the program.

Enhancements:

 File I/O: Save and load data to/from files for persistent storage.
 Categorization: Implement a more detailed categorization system for
expenses.
 Visualization: Use libraries like Matplotlib or Seaborn to visualize
income, expenses, and savings.
 User Interface: Create a more user-friendly interface using a GUI library
like Tkinter or PyQt.
 Security: If storing sensitive financial data, consider encryption
techniques.
 Error Handling: Implement error handling to catch invalid inputs and
prevent crashes.

CONCLUSION
This Python-based budget tracker provides a solid foundation for managing
personal finances. By utilizing dictionaries and lists to store income and
expense data, the program offers a flexible and efficient way to track financial
transactions.

Key Features:

 Income and Expense Tracking: Users can easily add income sources
and categorize expenses.
 Balance Calculation: The program accurately calculates the remaining
balance by subtracting total expenses from total income.
 User-Friendly Interface: The menu-driven interface simplifies
interaction with the program.

Potential Enhancements:

 Data Persistence: Implement file I/O to save and load data, allowing for
long-term tracking.
 Advanced Categorization: Introduce a more detailed categorization
system for expenses to gain deeper insights into spending habits.
 Goal Setting and Tracking: Allow users to set financial goals and
monitor progress towards them.
 Security: Implement encryption techniques to protect sensitive financial
information.
 Error Handling: Incorporate robust error handling to prevent
unexpected crashes and provide informative error messages.

By incorporating these enhancements, this budget tracker can become a


powerful tool for individuals to achieve their financial goals and make informed
decisions about their money.

You might also like