0% found this document useful (0 votes)
34 views

Sample Cs Project Class 12

This document appears to be a student project report on developing a financial management system. It includes sections on certificates, acknowledgements, working descriptions, source code, and future directions. The source code section shows Python code for creating income and expense databases and functions for updating data, entering new data, viewing goals and reports. The code allows users to track finances and compare to budgets.

Uploaded by

ADWAITH Editz
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)
34 views

Sample Cs Project Class 12

This document appears to be a student project report on developing a financial management system. It includes sections on certificates, acknowledgements, working descriptions, source code, and future directions. The source code section shows Python code for creating income and expense databases and functions for updating data, entering new data, viewing goals and reports. The code allows users to track finances and compare to budgets.

Uploaded by

ADWAITH Editz
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/ 35

DELHI PUBLIC SCHOOL

GHAZIABAD
MEERUT ROA

FINANCE MANAGEMENT
SYSTEM

NAME :
CLASS/SECTION :
ROLL NO SESSION
BOARD ROLL NUMBER
CONTENTS
➢ Certificate

➢ Acknowledgement

➢ Working Description

➢ Source Code

➢ Output Screen

➢ Way Forward

➢ Bibliography
CERTIFICATE
This is to certify that Amsal Uzair of class XII-A4
has prepared the report on the project entitled,
‘Financial Management System.’ The report is the
results of his efforts and endeavours. The report is
found worthy of acceptance as final project report
for the subject Computer Science of class XII. He
has prepared the report under my guidelines.

Ms.
(H.O.D. Computer Science)
(Delhi Public School Ghaziabad)

ACKNOWLEDGEM ENT
I would like to express my deep sense of thanks
and gratitude to my project guide
‘Mrs.
for guiding me immensely through the project.
She always evinced keen interest in my work. Her
advice helped me in successful completion of the
project.

I also thank my parents for their motivation and


support. I also thank my classmates for their
timely support.

Last but not the least; I would like to thank all


those who had helped directly or indirectly
towards the compilation of the project.
WORKING
DESCRIPTION
The first step would be asking if the user is new
or existing.
If the user is new then the program asks the
user to enter his/her finance related details by
asking various questions
Then the program gives the user a goal chart on
how to spend his/her income next month and
invite user to visit next month to check if he/she
achieved his/her goal.
If the user is existing then the program asks
various questions related to how the user spent
his salary this month and then tell the user if
he/she achieve his/her goal or not and on what
aspect he/she should work on next month.
MODULES USED
LIBRARY MODULES-
mysql.connector
math

USER DEFINED MODULES-

Packages required to be installed-

pip mysql-connector
SOURCE CODE
FINANCE MANAGEMENT SYSTEM

import mysql.connector
mydb = mysql.connector.connect(host="localhost",
user="amsal", passwd="1234", database="finance")
mycursor= mydb.cursor()

sqltable= "CREATE TABLE IF NOT EXISTS


income(name VARCHAR(200), salary INT, freelance
INT, dividend INT, business INT, other INT)"
mycursor.execute(sqltable
) mydb.commit()

sqltable2= "CREATE TABLE IF NOT EXISTS expense(name


VARCHAR(200), elecbill INT, internet INT, rent INT,
entertainment INT, groceries INT, petrol INT, invest INT, edu
INT, charity INT, other INT, saving INT)"

mycursor.execute(sqltable2
) mydb.commit()
def update():
name=input("Please enter your name; ")
sqlformula="SELECT * FROM income"
mycursor.execute(sqlformula)
result=mycursor.fetchall()
for i in result:

if i[0]==name:
print()
print("Welcome, Please choose which data you want
to change")
print("enter 1 for salary")
print("enter 2 for
freelance") print("enter 3
for dividend") print("enter 4
for business") print("enter 5
for other") print()
num=int(input("enter your choice
here")) print()
value=int(input("enter the new value"))

vt=(value,name)

if num==1:
sqlformula2="UPDATE income SET salary = %s.
WHERE name = %s"
mycursor.execute(sqlformula2,vt)
mydb.commit()
print("data entered
successsfully") print()

elif num==2:

sqlformula2="UPDATE income SET freelance =


%s WHERE name = %s"
mycursor.execute(sqlformula2,vt)
mydb.commit()
print("data entered
successsfully") print()

elif num==3:
sqlformula2="UPDATE income SET dividend = %s
WHERE name = %s"
mycursor.execute(sqlformula2,vt)
mydb.commit()
print("data entered successsfully") print()
elif num==4:
sqlformula2="UPDATE income SET business =
%s WHERE name = %s"
mycursor.execute(sqlformula2,vt)
mydb.commit()

print("data entered
successsfully") print()

elif num==5:

sqlformula2="UPDATE income SET other =


%s WHERE name = %s"
mycursor.execute(sqlformula2,vt)
mydb.commit()
print("data entered
successsfully") print()

else:
print("enter a valid number")

def dataentry():
name=input("pls enter your
name") namet=(name,)
sqlformula="SELECT * FROM
expense"
mycursor.execute(sqlformula)
result=mycursor.fetchall()
for i in result:

if i[0]==name:
print()
print("Welcome, pls tell us how much you spent
this month on the following: ")
electricitybill=
int(input("electricitybill")) internet2=
int(input("internet bill")) rent2=
int(input("rent"))
entertainment2= int(input("entertainment
like netflix"))
groceries2= int(input("groceries and food"))
petrol2= int(input("petrol/diesel"))
invest2= int(input("investment in stocks"))

edu2= int(input("investment on your education like


books and courses"))
give2= int(input("donation"))
other2= int(input("enter the money you spend on
other things like shopping etc"))

totalexpense=electricitybill+internet2+rent2+entertainment2
+groceries2+petrol2+invest2+edu2+give2+other2
exp=(electricitybill, internet2, rent2, entertainment2,
groceries2, petrol2, invest2, edu2, give2, other2,str(name))

sqlformula2="SELECT * FROM
income"
mycursor.execute(sqlformula2)
result2=mycursor.fetchall(
) totalincome=0
for j in result2:
if
j[0]==name:
totalincome=j[1]+j[2]+ j[3] + j[4]+ j[5]
savings=totalincome+totalexpense

print()
print("your last month's financial status
was:") print()
print("spending on
necessaties:",i[1]+i[2]+i[3]+i[5]+i[6]
)
print("spending on fun:",i[4]+i[10])
print("spending on investment: ",i[7])
print("spending on charity: ",i[9])
print("spending on education: ",i[8])
'''print("savings: ",i[11])'''
print()

sqlformula3="UPDATE expense SET elecbill= %s,


internet= %s,rent= %s, entertainment= %s,groceries=
%s, petrol= %s, invest= %s, edu= %s, charity= %s,other=
%s WHERE name=%s"
mycursor.execute(sqlformula3,exp)
mydb.commit()

sqlformula4= "SELECT * FROM


expense"
mycursor.execute(sqlformula4)
result5=mycursor.fetchall()
for r in result5:
if
r[0]==name:

print()
print("your current financial status
is:") print()
print("spending on
necessaties:",r[1]+r[2]+r[3]+r[5]+r[6]
)
print("spending on fun:",r[4]+r[10])
print("spending on investment: ",r[7])
print("spending on charity: ",r[9])
print("spending on education: ",r[8])
'''print("savings: ",r[11])"'''
print()
def seegoal():
totalincome=
0

name=input("pls enter your name")


sqlformula="SELECT * FROM
income"
mycursor.execute(sqlformula)
result=mycursor.fetchall()
for i in result:

if i[0]==name:

totalincome=i[1]+ i[2] + i[3] + i[4] + i[5]

idealnec= totalincome*0.55
idealsaving= totalincome*0.10
idealinvest=totalincome*0.10
idealeducation=
totalincome*0.10 idealfun=
totalincome*0.10 idealgive=
totalincome*0.05
print()
print("Here are your goals of the
month") print()
print("spending on necessaties:
",round(idealnec,2))
print("spending on fun: ",round(idealfun,2))
print("spending on
investment: ",round(idealinvest,2))
print("spending on charity:

",round(idealgive,2)

) print("spending on education:

",round(idealeducation,2))
print("saving: ",round(idealsaving,2)
) print()
else:

continue
print("user not found")
def showall():
mycursor.execute("SELECT * FROM income")
myresult=
mycursor.fetchall() for i in
myresult:
print(i)

mycursor.execute("SELECT * FROM
expense") myresult= mycursor.fetchall()
for i in
myresult:
print(i)

def newentry():
name = input("enter your name: ")
print("Let's talk about your income
first")
print("We are going to ask you how much you earn
from different sources, Enter your monthly income and
type 0 if you don't use that source to earn ")
print()
sal=int(input("enter your monthly salary"))
freelance= int(input("how much you earn by
freelancing")) dividend= int(input("how much you earn
from dividend")) business= int(input("how much you earn
from your
business"))
other = int(input("how much you earn by other sources"))
mysql= "INSERT INTO income (name, salary, freelance,
dividend, business, other) VALUES (%s, %s, %s, %s, %s, %s)"
data=(name, sal, freelance, dividend, business, other)
mycursor.execute(mysql, data)
mydb.commit(
) print()
print("GREAT!! Let's talk about your expenses
now") print()
print("We are going to ask you how much you spend on
different sectors, Enter your monthly expenses on the
following thing. Don't worry, no need to be exact ")
print()
electricitybill= int(input("enter your
monthly electricitybill"))
internet= int(input("enter your monthly internet bill"))

rent= int(input("enter your monthly rent"))

entertainment= int(input("enter your monthly

expenditure

on entertainment like netflix"))


groceries= int(input("enter your monthly expenditure on
groceries and food"))
petrol= int(input("enter your monthly expenditure on
petrol/diesel"))
invest= int(input("How much you invest monthly in
stocks or other investment sources"))
edu= int(input("enter your monthly investment on your
education like books and courses"))
give= int(input("enter the monthly amount you donate in
charity or to the needy ones"))
other= int(input("enter the money you spend on other
things like shopping etc"))

totalincome=sal+freelance+dividend+business+other

totalexpenses=electricitybill+internet+rent+entertainment+gr
oceries+petrol+other
saving=totalincome-totalexpenses

sqlformula= "INSERT INTO expense (name, elecbill,


internet, rent, entertainment, groceries, petrol, invest, edu,
charity, other) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s)"
data2=(name, electricitybill, internet, rent, entertainment,
groceries, petrol, invest, edu, give, other)
mycursor.execute(sqlformula, data2)
mydb.commit()

totalincome=sal+freelance+dividend+business+other
totalexpenses=electricitybill+internet+rent+entertainment+gr
oceries+petrol+other

idealnec= totalincome*0.55
idealsaving= totalincome*0.10
idealinvest=totalincome*0.10
idealeducation=
totalincome*0.10 idealfun=
totalincome*0.10 idealgive=
totalincome*0.05

print()
print("Thank You, your current financial report is:")
print()
print("spending on necessaties:
",electricitybill+internet+rent+groceries+petrol)
print("spending on fun: ",
entertainment+other) print("spending on
investment: ",invest)
print("spending on charity: ",give)
print("spending on education: ",edu)

print("saving: ",totalincome-
totalexpenses) print()
print("We have also prepared a goal chart for you to
manage your finance accordingly next month")
print()
print("spending on necessaties: ",round(idealnec,2))
print("spending on fun: ",round(idealfun,2))
print("spending on investment:
",round(idealinvest,2))
print("spending on charity: ",round(idealgive,2))
print("spending on education:
",round(idealeducation,2))
print("saving: ",round(idealsaving,2)
) print()
print("come back next month to check if you
accomplished your goals, ALL THE BEST!")

print('\n,\n,\n')
print("--------FINANCE FREEDOM ")
print()
print("Manage your finance with
ease") print()
print("Are you an existing
user?") print()
u=input("type 'y' for yes or 'n' for no; ")
print()
while True:
if u.lower() =="y":
print("WELCOME
BACK!")
print()

print("Choose the desired option from the following")


print()
print("Enter 1 to enter to enter your expenses for this
month and see if you achieved your goal")
print("Enter 2 to see your goal for this month")
print("Enter 3 to update your income information")
print("Enter 4 to exit")
print()

n=int(input("Enter your choice here; "))

if n==1:
dataentry(
) print()
input("press any key to return")

if n==2:
seegoal()
print()
input("press any key to return")

if n==3:
update()
print()
input("press any key to return")

if n==4:
break

if u.lower()=="n":
newentry()
print()
input("press any key to
exit") break
OUTPUT SCREEN
--------FINANCE FREEDOM--------

Manage your finance with ease

Are you an existing user?

type 'y' for yes or 'n' for no; n

enter your name: Amsal


Let's talk about your income first
We are going to ask you how much you earn from
different sources, Enter your monthly income and type
0 if you don't use that source to earn

enter your monthly salary75000


how much you earn by freelancing0
how much you earn from dividend2000
how much you earn from your business10000
how much you earn by other sources0

GREAT!! Let's talk about your expenses now

We are going to ask you how much you spend on


different sectors, Enter your monthly expenses on the
following thing. Don't worry, no need to be exact

enter your monthly electricitybill10000


enter your monthly internet bill2000
enter your monthly rent30000
enter your monthly expenditure on entertainment like
netflix2000
enter your monthly expenditure on groceries and
food5000
enter your monthly expenditure on petrol/diesel3000
How much you invest monthly in stocks or other
investment sources5000
enter your monthly investment on your education like
books and courses2000
enter the monthly amount you donate in charity or to
the needy ones1000
enter the money you spend on other things like
shopping etc10000

Thank You, your current financial report is:

spending on necessaties: 50000


spending on fun: 12000
spending on investment: 5000
spending on charity: 1000
spending on education: 2000
saving: 35000

We have also prepared a goal chart for you to manage


your finance accordingly next month

spending on necessaties: 53350.0


spending on fun: 9700.0
spending on investment: 9700.0
spending on charity: 4850.0
spending on education: 9700.0
saving: 9700.0

come back next month to check if you accomplished


your goals, ALL THE BEST!

press any key to exit


WAY FORWARD
Due to shortage of time and resources, the project
has much scope for amendments.The project is
accessible to one user at a time which have rather
be made into multiple users at a time. The
presentation can be more effective. Also, the
project is open to any valid suggestions
BIBLIOGRAPHY
Computer Science with python (Sumita Arora)
www.stackexchange.com
https://learnindia.co.in
www.google.co.in
www.geekforgeeks.org

You might also like