0% found this document useful (0 votes)
12 views22 pages

Vibhav Cs

The document presents a project titled 'Personal Expense Tracker' completed by Vaibhav Subhash T, a Class XII student at Narayana e-Techno School, as part of the Computer Science practical examination. The project aims to help individuals track and analyze their expenses, featuring functionalities such as expense entry, categorization, and total calculation, implemented in Python. The document includes acknowledgments, objectives, project requirements, source code, and future scope for enhancements.

Uploaded by

Prajwal Chandak
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)
12 views22 pages

Vibhav Cs

The document presents a project titled 'Personal Expense Tracker' completed by Vaibhav Subhash T, a Class XII student at Narayana e-Techno School, as part of the Computer Science practical examination. The project aims to help individuals track and analyze their expenses, featuring functionalities such as expense entry, categorization, and total calculation, implemented in Python. The document includes acknowledgments, objectives, project requirements, source code, and future scope for enhancements.

Uploaded by

Prajwal Chandak
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/ 22

Narayana e-techno school

Hulimavu ,bannerghatta road,


BANGALORE–560076
AFFILIATION CODE:830939
SCHOOL CODE :45870
SUBJECT CODE : 083

COMPUTER SCIENCE
“PERSONAL EXPENSE TRACKER”

PROJECT DONE BY
NAME : VAIBHAV SUBHASH T
REGISTER NO :
CLASS : 12
CERTIFICATE
This is to certify that VAIBHAV SUBHASH T COMPUTER
SCIENCE student of class XII of NARAYANA E-TECHNO
SCHOOL, HULIMAVU, BANNERGHATTA ROAD
BANGALORE. has successfully completed the project entitled:

" Personal Expense Tracker "


He has submitted the above mentioned under the guidance of
Ms.N.Sateeswari during the year 2024-25 in partial fulfilment
of COMPUTER SCIENCE practical examination conducted
under AISSCE (All India Senior School Certificate
Examination by CBSE)

Date:

Place:

Signature Signature Signature

of Principal of Subject Teacher of Examiner

Institute Stamp
2|Page
Computer science project 2024 – 2025
Topic: Personal Expense Tracker

VAIBHAV SUBHASH T
Class XII
SUBJECT CODE: 083

INTERNAL EXAMINER EXTERNAL EXAMINER

3|Page
TABLEOFCONTENTS

SER DESCRIPTION PAGE NO

01 ACKNOWLEDGEMENT 5

02 INTRODUCTION 6

03 OBJECTIVES OF THE PROJECT 7

04 PROPOSED SYSTEM 8

05 PROJECT REQUIREMENTS 9

06 SOURCE CODE 10-14

07 SCREEN SHOTS-CODE 15-17

08 SCREEN SHOTS-OUTPUT 18-20

09 FUTURE SCOPE 21

10 BIBLIOGRAPHY 22

4|Page
Acknowledgement
The success of any project is not solely the result of individual efforts but is also
significantly influenced by the encouragement and guidance of others. I would
like to take this opportunity to sincerely thank all those who have been
instrumental in the successful completion of this project.

I express deep sense of gratitude to Almighty God for giving me strength for the
successful completion of the project. I express my heartfelt gratitude to my
parents for constant encouragement while carrying out this project.

I express my deep sense of gratitude to the luminary The Principal, Narayana E-


techno School, Hulimavu, who has been continuously motivating their helping
hand to us.

I express my sincere thanks to the academician The Vice Principal, Narayana E-


techno School, Hulimavu, for constant encouragement and the guidance provided
during this project.

I am overwhelmed to express my thanks to The Administrative Officer, Narayana


E-techno School, Hulimavu, for providing me an infrastructure and moral support
while carrying out this project in the school.

My sincere thanks to Ms. N.Sateeswari, a guide, mentor and above all a friend
who critically reviewed my project and helped in solving each and every problem,
occurred during implementation of the project.

The guidance and support received from all the members who contributed and
who are contributing to this project, was vital for the success of the project. I am
grateful for their constant support and help.

5|Page
INTRODUCTION
Overview of Financial Management Effective financial management is essential
for individuals and businesses to thrive in a complex economic environment.
Personal financial management involves the planning, organizing, and monitoring
of personal finances to meet long-term goals. For individuals, managing expenses
plays a crucial role in achieving financial goals, whether it's saving for retirement,
paying off debt, or simply maintaining financial stability. Tracking expenses,
however, can be a time-consuming and difficult task if done manually, particularly
when dealing with multiple income sources and expenditures.

A Personal Expense Tracker helps individuals keep track of their spending in a


structured way, allowing them to categorize expenses, set budgets, and analyze
spending patterns. This project aims to provide an efficient tool for managing
daily expenses, helping individuals gain insights into their financial habits and
make informed decisions about their finances.

Importance of Expense Tracking Expense tracking is a cornerstone of good


financial health. Regularly tracking expenses provides several benefits:

Budgeting: Helps individuals identify where their money is going and adjust
spending to align with financial goals.

Debt Management: By tracking expenses, individuals can avoid overspending and


accumulating debt.

Savings & Investment: With a clear picture of monthly expenses, users can
allocate more funds to savings or investments.

Financial Awareness: Regular tracking encourages better awareness of spending


patterns and can prevent impulse buying. This Personal Expense Tracker will serve
as a lightweight tool to help users record their daily expenditures, view
categorized reports, and track their total expenses

6|Page
OBJECTIVES OF THE PROJECT
Objective of personal expense tracker can be

 Track Spending: Accurately record all daily expenses.


 Categorize Expenses: Organize expenses into meaningful categories for
better analysis.
 Summarize Spending: Generate reports on total expenses, spending by
category, and spending trends
 Analyze Spending Habits: Identify spending patterns and areas for
potential savings.
 Improve Financial Awareness: Gain a better understanding of personal
finances and make informed financial decisions.
 Achieve Financial Goals: Track progress towards saving goals and make
adjustments to spending habits as needed.

By achieving these objectives, a personal expense tracker can empower individuals


to take control of their finances, make informed spending decisions, and ultimately
improve their overall financial well-being.

7|Page
PROPOSED SYSTEM
The proposed system for “personal expense tracker” is designed to help individuals
record, categorize, and analyze their spending habits to improve financial
awareness and achieve their financial goals.

Key features of personal expense tracker:

Expense Entry: Allows users to input expenses with details such as category,
amount, and date.

Expense Summary: Displays a list of all recorded expenses, including amounts


and categories.

Total Calculation: Calculates the total of all expenses to help users understand
their spending patterns.

Data Persistence: Saves expenses to a file and loads them when the program starts
again, ensuring data is not lost.

User-Friendly Interface: A simple command-line interface that is easy to


navigate

8|Page
PROJECT REQUIREMENTS
1. Hardware Requirements
 The project can run on most standard computers with these basic
specifications:
 Processor: Intel Core i3 or higher.
 RAM: At least 4 GB of RAM (8 GB recommended for smoother
performance).
 Storage: About 100 MB of free space for storing the game files and
database.
 Display: A monitor with a resolution of 1024x768 or higher.
2. The project leverages Python and its built-in features for simplicity and
ease of use:
 Python 3.x: Python is an ideal language for this project due to its
readability, ease of use, and support for file handling and basic data
structures.
 File I/O: Expenses are stored in a text file (CSV format), allowing the
program to persist data across sessions without the need for a database.
 Lists and Dictionaries: Expenses are stored in a list of dictionaries, where
each dictionary contains details about a specific expense (category,
amount, and date).
 CLI (Command Line Interface): The program uses a simple CLI interface
for interaction, making it lightweight and easy to use without requiring
any graphical elements.

9|Page
SOURCE CODE

A. MainCode

Here is the Python code for the Personal Expense Tracker application:

# Function to display the menu

def display_menu():

print("\nPersonal Expense Tracker")


print("1. Add Expense")
print("2. View Expenses")
print("3. View Total Expenses")
print("4. Exit")

# Function to check if the year is a leap year


def is_leap_year(year):
if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
return True
return False
# Function to validate the date

def is valid_date(date):

try:

# Check if the date is in the correct format (YYYY-MM-DD) year, month, day
= map(int, date.split('-'))

# Check if the year, month, and day are in valid ranges


if not (1000 <= year <= 9999): # Year should be between 1000 and 9999
return False
if not (1 <= month <= 12): # Month should be between 1 and 12
return False
# Days per month for normal years
days_in_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

10 | P a g e
# Check for leap year (February has 29 days)
if is_leap_year(year):
days_in_month[1] = 29 # February has 29 days in a leap year

# Check if the day is valid for the month


if not (1 <= day <= days_in_month[month - 1]):
return False
return True
except ValueError:
return False

# Function to add a new expense with error handling

def add_expense(expenses):

while True:

try:

category = input("Enter expense category (e.g., Food, Bills, Entertainment): ")


if not category:
raise ValueError("Category cannot be empty.")
amount = float(input("Enter expense amount: "))
if amount <= 0:
raise ValueError("Amount must be a positive number.")

# Validate the date


while True:

date = input("Enter the date (YYYY-MM-DD): ")

if is_valid_date(date):

break # Exit the inner loop if the date is valid else:

print("Invalid date format or non-existent date. Please enter a valid date


(YYYY-MM-DD).")

expense = {'category': category, 'amount': amount, 'date': date}


expenses.append(expense)

print("Expense added successfully!")

11 | P a g e
break # Exit loop after valid input
except ValueError as e:
print(f"Error: {e}. Please try again.")
# Function to view all recorded expenses
def view_expenses(expenses):
if not expenses:
print("No expenses recorded yet.")
return
print("\nExpenses:")
for expense in expenses:
print(f"Date: {expense['date']}, Category: {expense['category']}, Amount:
{expense['amount']}")
# Function to calculate and display the total of all expenses
def view_total(expenses):

if not expenses:

print("No expenses recorded yet.")

return

total = sum(expense['amount'] for expense in expenses)

print(f"\nTotal Expenses: {total}")

# Function to load expenses from a file (if any)


def load_expenses(filename):
expenses = []
try:
with open(filename, 'r') as file:
for line in file:
date, category, amount = line.strip().split(',')
expenses.append({'date': date, 'category': category, 'amount':
float(amount)})
except FileNotFoundError:
print("No previous expense records found. Starting fresh.")
return expenses
# Function to save expenses to a file

def save_expenses(expenses, filename):

with open(filename, 'w') as file:

12 | P a g e
for expense in expenses:

file.write(f"{expense['date']},{expense['category']},{expense['am
ount']}\n")

# Main function that runs the program


def main():
expenses = load_expenses('expenses.txt')
while True:
display_menu()
choice = input("Choose an option: ")
if choice == '1':
add_expense(expenses)
elif choice == '2':
view_expenses(expenses)
elif choice == '3':
view_total(expenses)
elif choice == '4':
save_expenses(expenses, 'expenses.txt')
print("Data saved. Exiting...")
break
else:
print("Invalid choice. Please select a valid option.")
# Run the main function to start the program
if name == " main ":
main()
B. Code Explanation

The program is divided into distinct functions:

1. display_menu(): Displays a simple menu for user interaction.

2. add_expense(): Collects details about an expense, validates the input, and adds it to
the expense list.

3. view_expenses(): Displays all recorded expenses in a user-friendly format.

4. view_total(): Calculates and displays the total amount spent across all recorded
expenses.

5. load_expenses(): Loads previously saved expenses from a text file, allowing data
persistence.

13 | P a g e
6. save_expenses(): Saves the list of expenses to a text file for later retrieval.

The main program runs in a loop, allowing the user to add, view, and manage
expenses until they choose to exit.

14 | P a g e
SCREEN SHOTS OF THE CODE
SCREEN -1

15 | P a g e
SCREEN -2

16 | P a g e
SCREEN -3

17 | P a g e
CODE- OUTPUT
SCREEN -1

18 | P a g e
SCREEN -2

19 | P a g e
SCREEN - 3

20 | P a g e
FUTURE SCOPE
1. Extending to Multi-User Environment:

 Enable shared budgets for couples or families.


 Support tracking expenses for dependents.

2. Enhanced Reporting:

 Create interactive dashboards for data visualization.


 Allow users to generate customized reports.

3. Integration with AI/ML:

 Predict future spending.


 Automate expense categorization.
 Extract data from receipts using AI/ML.

4. Financial Integrations:

 Connect directly to bank accounts and credit cards.


 Receive real-time updates on transactions.

5. Personalization:

 Offer customized financial advice based on user data.


 Assist users in creating and sticking to budgets.

6. Cross-Platform:

 Develop mobile apps for iOS and Android.


 Ensure seamless data synchronization across devices.

21 | P a g e
BIBLIOGRAPHY
1. Text Book - Computer Science With Python-12th Std - Sumita Arora
2. Core Python Concepts:

 "Python Crash Course" by Eric Matthes: A comprehensive guide to


Python programming, covering fundamental concepts like data structures
(lists, dictionaries), control flow, and file handling, which are essential
for building the expense tracker.

3. Command-Line Interface (CLI)

 Python Documentation (input(), print(), sys.argv): Familiarize


yourself with the input() function for user input, the print() function for
displaying output.

4. Create Expense Tracker Project in Python - Python Geeks – Website to


understand the basic concepts and implementation of Code

22 | P a g e

You might also like