100% found this document useful (1 vote)
188 views

Python Project

This document provides a summary of a student project to create an expense management system using Python. The project aims to develop a command-line tool to allow users to add, view, and manage expenses. Key features include adding new expenses, viewing all expenses and expenses by month, updating records, and deleting data. The system uses a SQLite database to store and retrieve expense information. The document outlines the implementation process, including topic selection, work distribution, coding, and testing the completed project code. It provides examples of the Python code used to create the database structure and implement the main program functions.

Uploaded by

hamza khan
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
100% found this document useful (1 vote)
188 views

Python Project

This document provides a summary of a student project to create an expense management system using Python. The project aims to develop a command-line tool to allow users to add, view, and manage expenses. Key features include adding new expenses, viewing all expenses and expenses by month, updating records, and deleting data. The system uses a SQLite database to store and retrieve expense information. The document outlines the implementation process, including topic selection, work distribution, coding, and testing the completed project code. It provides examples of the Python code used to create the database structure and implement the main program functions.

Uploaded by

hamza khan
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/ 15

A Micro-Project Report

On
“TOPIC NAME”
Submitted on 13-04-2023
By
1. KHAN HAMZA
2. NOUMAN RIYAZ SAYYED
3. ARSHIL KHAN
4. AKHTAR KHAN
Under Guidance of
“IMRAN SIR”
In
Three Years Diploma Program in Engineering & Technology of Maharashtra State
Board of Technical Education, Mumbai (Autonomous)
ISO 9001:2015

At
Anjuman-I-Islam’s Abdul Razzak Kalsekar

Polytechnic Academic Year [ 2022 - 2023 ]


Annexure – I A
Title of Micro-Project
STUDENT DATA MANAGEMENT SYSTEM

1.0 Brief Introduction


Expenditure maintenance refers to the process of managing and keeping track of expenses. In today's
fast-paced world, it is crucial to maintain a record of all expenses to avoid overspending and keep
finances under control. Python is a popular programming language that can be used to create tools to
manage expenses effectively.
The tool will allow users to:
1. Add a new expense
2. View all expenses
3. View expenses by Month
4. Delete the data
5. Update the record
2.0 Aim of the Micro-Project
The aim of this project is to develop a simple command-line tool using Python that can help users
manage their expenses effectively. The tool will allow users to add new expenses, view all expenses,
view expenses by month, delete , update and save and load expenses from a SQLite.
3.0 Action Plan
S. No. Details of activity Planned Start Planned Name of Responsible
date Finish date Team Members
1 Topic Selection 10-04-2023 10-04-2023 Khan Akhtar

2 Designing of topic output 10-04-2023 10-04-2023 Nouman Riyaz


Sayyed, Khan Hamza
3 Functionality Discussion 10-04-2023 10-04-2023 Khan Akhtar , Arshil,
Khan hamza ,
Nouman Sayyed

4 Actual Implementation 11-04-2023 11-04-2023 Khan Akhtar , Arshil ,


Khan hamza ,
Nouman Sayyed

5 Accomplishment Of Project 12-04-2023 12-04-2023 Khan Akhtar , Arshil,


Khan hamza ,
Nouman Sayyed

4.0 Resources Required (major resources such as raw material, some machining facility, software etc.)
S. No. Name of Resource/material Specifications Qty Remarks
1 VS Code Version 11 - -

2 Python(Nirali textbook) - - -

**************
Annexure – II A
PART B (Outcomes after Execution and)
Format for Micro-Project Report (About 6-10 pages)
For 1st To 4th Semester

Title of Micro-Project

STUDENT DATA MANAGEMENT SYSTEM

1.0 Brief Description (Importance of the project, in about 100 to 200 words)
Expenditure maintenance refers to the process of managing and keeping track of expenses. In today's
fast-paced world, it is crucial to maintain a record of all expenses to avoid overspending and keep
finances under control. Python is a popular programming language that can be used to create tools to
manage expenses effectively.
The tool will allow users to:
1. Add a new expense
2. View all expenses
3. View expenses by Month
4. Delete the data
5. Update the record

2.0 Aim of Micro Project

The aim of this project is to develop a simple command-line tool using Python that can help users
manage their expenses effectively. The tool will allow users to add new expenses, view all
expenses, view expenses by month, delete , update and save and load expenses from a SQLite.

3.0 Course Outcomes Integrated


a) Perform operations on data structures in Python
b) Develop functions for given problems
4.0 Actual Procedure Followed.
1. Topic selection and discussion.
2. Work distribution.
3. Implementation of logics.
4. Implementation of code.
5. Accomplishtion of project coding.
6. Inspection/Debugging of project code.

5.0 Actual Resources Used (Mention the actual resources used).


S. No. Name of Resource/material Specifications Qty Remarks
1 VS Code Version 11 - -

2 Python(Nirali textbook) - - -

6.0 Outputs of the Micro-Projects


(Drawings of the prototype, drawings of survey, presentation of collected data, findings etc.)
CODE
# Expenditure maintenance

Create a database
import sqlite3

conn = sqlite3.connect("expenses.db")

cur = conn.cursor()

cur.execute("""CREATE TABLE IF NOT EXISTS expenses


(id INTEGER PRIMARY KEY AUTOINCREMENT,
Date Date,
description TEXT,
category TEXT,
price REAL)""")

conn.commit()
conn.close()
# Main.py

import sqlite3
import datetime
import matplotlib.pyplot as plt

conn = sqlite3.connect("expenses.db")
cur = conn.cursor()

while True:
    print("Select an option :")
    print("1. Enter a new expense")
    print("2. View expenses summery")
    print("3. Update expenses")
    print("4. Delete expenses")

    choice = int(input())

    if choice == 1:
        date = input("Enter the date of the expenses
(YYYY-MM-DD): ")
        description = input("Enter the description of
the expenses: ")

        cur.execute("SELECT DISTINCT category


FROM expenses")

        categories = cur.fetchall()

        print("Select a category by number: ")


        for idx, category in enumerate(categories):
            print(f"{idx + 1}.{category[0]}")
        print(f"{len(categories) + 1}. Create a new
Category")

        category_choice = int(input())
        if category_choice == len(categories) +1:
            category = input("Enter the new category
name: ")
        else:
            category = categories[category_choice - 1]
[0]

        price = input("Enter the price of the


expenses: ")

        cur.execute("INSERT INTO expenses (Date ,


description, category, price) VALUES (?, ?, ?, ?)",
(date, description, category, price))
        conn.commit()

    elif choice == 2:
        print("Select an option: ")
        print("1. View all expenses: ")
        print("2. View monthly expenses by the
category: ")

        view_choice = int(input())
        if view_choice == 1:
            cur.execute("SELECT * FROM expenses")
            expenses_data = cur.fetchall()
            for expense in expenses_data:
                print(expense)
      
      
            # connect to the database
            # conn = sqlite3.connect('expenses.db')
            # cur = conn.cursor()

            # fetch the data


            cur.execute("SELECT category, SUM(price)
FROM expenses GROUP BY category")
            rows = cur.fetchall()

            # create lists of category names and total


expenses
            categories = [row[0] for row in rows]
            expenses = [row[1] for row in rows]

            # create a bar chart of the expenses


            plt.bar(categories, expenses)
            plt.xlabel('Category')
            plt.ylabel('Total expenses')
            plt.title('Expenses by category')
            plt.show()

            # close the database connection


      
      

        elif view_choice ==2:


            month = input("Enter the month (MM): ")
            year = input("Enter the year (YYYY): ")

            cur.execute("""SELECT category,
SUM(price)
                FROM expenses
                WHERE strftime('%m', Date) = ? AND
strftime('%Y', Date) = ?
                GROUP BY category""", (month, year))

            expenses = cur.fetchall()

            for expense in expenses:


                print(f"Category: {expense[0]}, Total:
{expense[1]}")

        else:
            exit()

  
    elif choice == 3:
        getDate = input("Enter the date of the
expenses (YYYY-MM-DD): ")
        getDescription = input("Enter the
description of the expenses: ")

        cur.execute("SELECT DISTINCT category


FROM expenses")

        fetCategories = cur.fetchall()

        print("Select a category by number: ")


        for idx, category in
enumerate(fetCategories):
            print(f"{idx + 1}.{category[0]}")
        # print(f"{len(fetCategories) + 1}. Create a
new Category")

        category_choices = int(input())
        if category_choices == len(fetCategories):
            user_category =
fetCategories[category_choices - 1][0]

        new_price = input("Enter the new price of


the expenses: ")

        query = "UPDATE expenses SET price = ?


WHERE date = ? AND description = ? AND
category = ?"
        category_name =
fetCategories[category_choices - 1][0]
        cur.execute(query, (new_price, getDate,
getDescription, category_name))

        conn.commit()

  
elif choice == 4:
        deDate = input("Enter the date of the
expenses (YYYY-MM-DD): ")
        deDescription = input("Enter the description
of the expenses: ")

        cur.execute("SELECT DISTINCT category


FROM expenses")

        deCategories = cur.fetchall()

        print("Select a category by number: ")


        for idx, category in
enumerate(deCategories):
            print(f"{idx + 1}.{category[0]}")
        # print(f"{len(fetCategories) + 1}. Create a
new Category")

        user_choice = int(input())
        if user_choice == len(deCategories):
            user_del_category =
deCategories[user_choice - 1][0]

        query = "DELETE FROM expenses WHERE


Date = ? AND description = ? AND category = ?"
        de_category_name =
deCategories[user_choice - 1][0]
        cur.execute(query, (deDate, deDescription,
de_category_name))

        conn.commit()

        cur.execute("VACUUM")

        conn.commit()

        
    else:
        exit()

    repeat = input("Would you like to do


something (y/n)?\n")
    if repeat.lower() !="y":
        break
conn.close()
OUTPUT
Adding Student Record

Enter new Expenses:

View expenses
View a monthly expenses
Update expenses price

Delete expenses

7.0 Skill Developed / learning out of this Micro-Project. (In about 15 to 30 words)

We have learned about the core python concept and implemented it in our project which enhanced our
skills in python field and opens a new door to explore ourself in this field.
Teacher Evaluation Sheet

Name of Student: ………………………………………………………… Enrollment No. ………………………………………………


Name of Program: ………………………………………………… Semester............................................................Course Title
……………………………………………………………….. Code: ……………………………………………………………

Title of the Micro-Project: …………………………………………………………………………………………………….

Course Outcomes Achieved


…………………………………………………………………………………………………………………………………………………………………………………..
Evaluation as per Suggested Rubric for Assessment of Micro Project
Sr. Characteristic to be assessed Poor Average Good Excellent
No ( Marks 1 - 3 ) ( Marks 4 - 5 ) ( Marks 6 - 8 ) ( Marks 9- 10
. )
1 Relevance to the course

2 Literature Survey / Information


Collection

3 Project Proposal

4 Completion of the Target as per


project proposal

5 Analysis of Data and


representation
6 Quality of Prototype/Model

7 Report Preparation

8 Presentation

9 Defense
Micro-Project Evaluation Sheet
Process Assessment Product Assessment Total
Part A - Project Project Methodology Part B - Project individual Marks
Proposal (2 marks) Report/Working Presentation/Viva
(2 marks) Model (4 marks) 10
(2 marks)

Note:
Every course teacher is expected to assign marks for group evolution in first 3 columns & individual
evaluation in 4TH columns for each group of students as per rubrics.

Comments/Suggestions about team work/leadership/inter-personal communication (if any)


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

Any Other Comment:


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

Name and designation of the Faculty Member…………………………………………………………….

Signature…………………………………………………………………………………………...................

You might also like