Skip to content

serraucar/Programming-Languages-CPE350

Repository files navigation

Python Expense Tracker

Overview

The Python Expense Tracker is a financial management application designed to help users efficiently manage their personal or business expenses. This project demonstrates the practicality and simplicity of Python as a modern programming language.

Features

  • Add Expenses: Record expenses with details such as amount, category, and description.
  • View Expense History: Display a list of all recorded expenses.
  • Generate Summary Reports: Provide a summary of expenses categorized by type.
  • Export Data: Save expense records as a CSV file for external analysis.

Project Highlights

Why Python?

  • Readable Syntax: Python's clean, natural language-like syntax ensures code simplicity.
  • Rich Ecosystem: Comprehensive libraries like datetime, csv, and collections enable quick implementation of features.
  • Versatility: Supports multiple programming paradigms and is widely adopted in web development, data science, automation, and more.

Implementation Details

  • Expense Management: Utilizes a Python class to encapsulate functionalities.
  • Data Aggregation: Employs collections.defaultdict for summarizing expenses.
  • File Handling: Uses the csv module for exporting data.
  • Interactive Console Menu: Provides a user-friendly interface for interaction.

Installation

  1. Clone the repository:
    git clone https://github.com/your-username/python-expense-tracker.git
  2. Navigate to the project directory:
    cd python-expense-tracker
  3. Run the application:
    python expense_tracker.py

Usage Instructions

  1. Run the Program: Execute the main script to start the tracker.
  2. Choose an Option: Use the menu to add expenses, view history, generate summaries, or export data.
  3. Test Functionality: Input sample data to test features like categorization and CSV generation.

Demo

To showcase the application's functionality:

  • Add a few sample expenses.
  • View the expense history.
  • Generate summary reports to analyze spending patterns.
  • Export the data and open it in a spreadsheet tool for further analysis.

Code Structure

  • ExpenseTracker: Core class managing expense-related functionalities.
    • add_expense: Records a new expense.
    • view_expenses: Displays all recorded expenses.
    • generate_summary: Provides a category-wise summary of expenses.
    • export_to_csv: Exports recorded expenses to a CSV file.
  • main(): Entry point for the application.

Advantages of Python

  • Extensive library support for tasks like data manipulation and file handling.
  • Simple and readable syntax that encourages rapid development.
  • Community support and resources for troubleshooting and learning.

Comparison with Other Languages

  • Python vs PHP: Python offers broader versatility beyond web development, whereas PHP excels in server-side scripting.
  • Python vs Ruby: While Ruby emphasizes elegance, Python focuses on simplicity and ease of use.

Resources

Contributors

  • Nisa Begüm Burucu
  • Elif Serra Uçar
  • Deniz Kenan Ek
  • Kerem Döleksöz

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Programming Languages Assignment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors