0% found this document useful (0 votes)
13 views14 pages

APSP2

Uploaded by

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

APSP2

Uploaded by

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

ARMY PUBLIC SCHOOL

DANAPUR CANTT
Affiliated to the CBSE, New Delhi
School Affiliation No. 380001 School Code- 65038

A PROJECT REPORT ON

Household Expenses Tracking


Submitted in partial fulfilment of the requirements for the award of
the degree of Intermediate in Science

SUBJECT- INFORMATICS PRACTICES (065)

Guide: Submitted By:


Mr. RAJ SHEKHAR SUMAN Anurag Kumar
PGT (Informatics Practices) Class Roll No.: 08
APS Danapur cantt Session: 2024-25
CBSE Roll No.:
202014017003

SUBMITTED TO
CERTIFICATE OF ORIGINALITY

This is to certify that the project report entitled Household Expenses Tracking submitted to

Central Board of Secondary Education for Informatics Practices Subject in partial fulfilment of

the requirement for the award of the degree of INTERMEDIATE IN SCIENCE from Army

Public School Danapur Cantt, is original work carried out by Ms / Mr Anurag Kumar with

CBSE roll no. _____________ of session 2024-2025 under my guidance.

The matter embodied in this project is genuine work done by the student and has not been

submitted whether to this School or to any other School / College / Institute / Department for the

fulfilment of the requirement of any course of study.

………………………. ...…………………….

Signature of the Student: Signature of the Guide

Date: ………………... Date: …………………

Roll. No., Name, Name, Designation of

Class and Session Guide:

……………………….. ………………………..

……………………….. ………………………..

……………………….. ………………………..
ACKNOWLEDGEMENT

Before going into thick of things I would like to add a few heartfelt words for the
people who were part of this project in numerous ways. A large number of
teachers, students and computer lovers have made valuable suggestions
which have been incorporated in this work. It is not possible to acknowledge all
of them individually. I take this opportunity to express my profound gratitude
and ineptness to them.
I am thankful to my Teacher Mr. Raj Shekhar Suman of
Informatics Practices subject at Army Public School Danapur Cantt for his kind
cooperation, excellent suggestions, moral support and guidance for his
continuous help, assistance and valuable suggestion during this course of the
work.

The love, affection and encouragement that I got from my family


members is unforgettable, they are my strength, my support and my pride.
How can I ever thank to my dearest Family Members for always cheering up
and spicing up my life.
It’s a time to depart and I am flooded with nostalgic memories of
spent with my friends. It shall always remember for their unforgettable
cooperation, in the project development.

At least we thank and praise the Almighty for his constant blessing and grace
through every step of our life.
INDEX

 Introduction………………………………
….5
 Features of the
project…………………….6
 Source Code…….
…………………………...7
 Sample
Output……………………………..11
 Flow Chart
 Hardware and Software
Requirements.12
 Bibliography………………………………
….13
Introduction

Now days in the having budget is very important to


keep track on the expenses and it also help to save
our money effectively. Here I am presenting
Household Expenses Tracking system to help you to
plan effectively your expenses and where at any time
with various functions add, view and analyse the
expenses and to save money for your future.
Features of the project
 Add Expense: Allows you to input expense
details, including date, category, description,
and amount.
 View All Expenses: Displays all recorded
expenses.
 Filter Expenses by Category: Lets you view
expenses specific to a category (e.g., Food,
Rent).
 Total Expenses: Calculates and shows the
total amount spent.
 Save to CSV: Exports the expense data to a
CSV file for long-term storage.

Source Code
import pandas as pd
# Initialize an empty DataFrame
to store expenses
columns = ["Date", "Category",
"Description", "Amount"]
expenses_df =
pd.DataFrame(columns=columns)

# Function to add a new


expense
def add_expense(date, category,
description, amount):
global expenses_df
new_expense = pd.DataFrame({
"Date": [date],
"Category": [category],
"Description": [description],
"Amount": [amount]
})
expenses_df =
pd.concat([expenses_df, new_expense],
ignore_index=True)
print("Expense added successfully!")
# Function to view all expenses
def view_expenses():
global expenses_df
if expenses_df.empty:
print("No expenses recorded yet.")
else:
print("\nAll Expenses:")
print(expenses_df)

# Function to filter expenses by


category
def
filter_expenses_by_category(category):
global expenses_df
filtered =
expenses_df[expenses_df["Category"]
== category]
if filtered.empty:
print(f"No expenses found for
category: {category}")
else:
print(f"\nExpenses for category
'{category}':")
print(filtered)
# Function to get total expenses
def total_expenses():
global expenses_df
total = expenses_df["Amount"].sum()
print(f"\nTotal Expenses: $
{total:.2f}")

# Function to save expenses to a CSV


file
def save_expenses_to_csv(file_name):
global expenses_df
expenses_df.to_csv(file_name,
index=False)
print(f"Expenses saved to
{file_name}")

# Example usage
if __name__ == "__main__":
while True:
print("\nHousehold Expense
Tracker")
print("1. Add Expense")
print("2. View All Expenses")
print("3. Filter Expenses by
Category")
print("4. Get Total Expenses")
print("5. Save Expenses to CSV")
print("6. Exit")

choice = input("Enter your choice:


")

if choice == "1":
date = input("Enter date (YYYY-
MM-DD): ")
category = input("Enter
category (e.g., Food, Rent, Utilities): ")
description = input("Enter
description: ")
amount = float(input("Enter
amount: "))
add_expense(date, category,
description, amount)
elif choice == "2":
view_expenses()
elif choice == "3":
category = input("Enter
category to filter by: ")
filter_expenses_by_category(category)
elif choice == "4":
total_expenses()
elif choice == "5":
file_name = input("Enter file
name to save (e.g., expenses.csv): ")
save_expenses_to_csv(file_name)
elif choice == "6":
print("Exiting the tracker.
Goodbye!")
break
else:
print("Invalid choice. Please try
again.")

Sample Output
Hardware & Software Requirements
 Minimum Hardware Requirement: -
Ram: 2GB
Processor: Quad-core processor with 3.0
GHz
Storage: 256 GB SSD

 Software Requirement: -
Python
Pandas Library
Excel (for import/ export of CSV file)
BIBLIOGRAPHY
1. Informatic practices(NCERT)
2. www.Goggle.com
3. www.github.com

You might also like