0% found this document useful (0 votes)
32 views30 pages

Diwali Project

Uploaded by

mrhaarun543
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)
32 views30 pages

Diwali Project

Uploaded by

mrhaarun543
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/ 30

INTRODUCTION

The project Bank Management System presented here represents a

pivotal solution in the realm of financial management, blending the

sophistication of MySQL as the database backend with the dynamic

capabilities of Python. This amalgamation results in a comprehensive

system that caters to both administrative and user functionalities,

streamlining processes related to account management, feedback

collection, and loan tracking.

Evolution of Management Systems using Python and MySQL

Connector

The evolution of management systems, especially in the banking

sector, has witnessed a paradigm shift with the advent of powerful

programming languages like Python and robust database management

systems such as MySQL. Python, recognized for its simplicity, readability,

and versatility, serves as the ideal frontend language for developing user-

friendly interfaces. MySQL, on the other hand, provides a reliable and

1
scalable database solution, ensuring the secure storage and retrieval of

crucial banking information.

The integration of these technologies facilitates a seamless flow of

data, enabling real-time interactions between users and the banking

system. The dynamic connectivity offered by the MySQL Python

Connector ensures efficient communication between the Python

application and the MySQL database.

Purpose of the Bank Management System

The Bank Management System project aims to address several key

challenges in traditional banking operations. By leveraging Python's

intuitive programming features and MySQL's robust data management

capabilities, the system provides an agile and user-centric platform for

both customers and administrators.

2
FUNCTIONS LIST

USER FUNCTIONS

•Add Account: Users can easily open new accounts by providing

essential details, streamlining the account creation process.

•View Balance: Account holders can check their account balance

in real-time, fostering transparency and financial awareness.

•Give Feedback: The system facilitates a channel for users to

provide feedback, ensuring continuous improvement based on user

input.

•View Transaction History: Users have access to their

transaction history, aiding in financial record-keeping and

reconciliation.

3
ADMIN FUNCTIONS

•Add New Accounts: Administrators can add new accounts to the

system, streamlining the process of on boarding newcustomers.

•View Loan Details: Admin have access to comprehensive loan

details, enabling effective management and decision-making.

•Update Loan Status: The system empowers administrators to

update the status of loans, tracking repayments and ensuring

accurate record-keeping.

•View Loan Defaulters: Admin can identify and view details of

customers who have defaulted on loan payments for a specified

period.

•View User Feedback: The system consolidates user feedback,

providing valuable insights into user experiences and concerns.

4
HARDWARES AND SOFTWARES REQUIRED

HARDWARES

1. Desktop Computer/Laptop

2. Windows 11

SOFTWARES

1. Python

2. MySQL

3. Python Connector Module

5
PYTHON SOURCE

CODE

6
#BANK MANAGEMENT SYSTEM
#IMPORTING MYSQL IN PYTHON
#CONNECTING MISOL WITH PYTHON
#IMPORT random FUNCTION FROM BUILT IN FUNCTION
import mysql.connector as con
import random
print('\t---WELCOME TO BANK MANAGEMENT SYSTEM---')
print(‘’)
#TO VIEW DATA OF THE USER
def view_data():
dbo=con.connect (host=“localhost", user 'root', password=”admin”
database=”bank_management_system”)
cu=dbo.cursor()
number=int(input(“Enter the account number”))
query=”select * from acct_holder where acct_no={}".format(number)
cu.execute (query)
for data in cu:
print("Account number”, data [0])
print("Name of account holder”, data [1])
print(“Phone number”, data [2])
print("Email", data [3])
print("Address", data [4])
print(“Intial balance”, data [5])
print(“Loan Taken”, data [6])
n=int(input(“””enter 1 for user menu :
enter 2 for exit “””)
if n==1:
user1()

7
if n==2:
return

#TO CHANGE THE NAME OF THE USER


def update_name():
dbo=con.connect(host=”localhost”, user= "root",
password="admin”,database="bank management system”)
cu=dbo.cursor()
holder=input(“Enter the updated name”)
number=int(input("Enter the account number”))
query=”update acct_holder set acct_holder name=('{}') where acct_no=()".
format(holder, number)
cu.execute(query)
dbo.commit()
n=int(input(“”"enter 1 for user menu:
enter 2 for exit: "”"))
print(“Name successfully updated”)
if n==1:
userl()
if n==2:
return

#TO CHANGE THE EMAIL OF THE USER


def update_email():
dbo=con.connect(host=”localhost”, user= "root", password=”admin”,
database = "bank_management_system”)
cu=dbo.cursor()
email=input("Enter the updated email”)
number=int(input("Enter the account number"))
8
query=”update acct_holder set email=’(}’ where acct_no=()”.format(email,
number)
cu.execute (query)
dbo.commit()
print(“Email successfully updated")
n=int(input("””enter 1 for user menu:
enter 2 for exit: “””))
if n==1:
user1()
if n==2:
return

#TO CHANGE THE PHONE NUMBER OF THE USER


def update_phone_number():
dbo=con.connect (host=”localhost", user="root", password="admin",
database=”bank_management_system”)
cu=dbo.cursor()
phone=input("Enter the updated phone number”)
number=int(input("Enter the account number"))
query=update acct_holder set phone_number={} where acct_no={}”.format
(phone, number)
cu.execute (query)
dbo.commit()
print("Phone number successfully updated")
n=int(input("””enter 1 for user menu:
enter 2 for exit:”””))
if n==1:
user1()

9
if n==2:
return

#TO CHANGE THE ADDRESS OF THE USER


def update_address():
dbo=con.connect (host=”localhost”, user= "root", password="admin",
database=”bank management system”)
cu=dbo.cursor()
address=input("Enter the updated address')
number=int(input("Enter the account number"))
query=update acct_holder set address=’{}’ where acct_no=’{}'.
format(address, number)
cu.execute (query)
dbo.commit()
print("Address was updated successfully")
n=int(input(“””enter 1 for user menu:
enter 2 for exit:”””))
if n==1:
user1()
if n=2:
return

#TO GIVE FEEDBACK TO THE BANK


def give_feedback():
dbo=con.connect(host=”localhost”, user=”root”, password=”admin”,
database=”bank_management_system”)
cu=dbo.cursor()
number=int(input("Enter your account number:”))
print(Enter your feedback)
10
feed=input("")
query=”insert into feedback values('{)', {})”.format(feed, number)
cu. execute (query)
dbo.commit()
print("Thank you for your feedback”)

n=int(input(“”"enter 1 for user menu:


enter 2 for exit: “””))
if n==1:
user1()
if n==2:
return

#TO VIEW THE LOAN STATUS OF THE USER BY ADMIN


def view_loan_status():
dbo=con.connect(host=”localhost”, user=”root”, password=”admin”,
database=”bank_management_system”)
number=int(input(“enter your account number"))
cu=dbo.cursor()
query=”select * from loan_acct where acct_no{}”.format(number)
cu.execute (query)
for data in cu:
print (cu)
number.commit()
n=int(input("””enter 1 for admin menu:
enter 2 for exit:”””))
if n==1:
user1()

11
if n==2:
return

#TO ADD DATA OF A NEW USER


def add_data():
dbo=con.connect (host=”localhost", user=”root”, password=”admin”,
database="bank_management_system”)
cu=dbo.cursor()
a=random.random()*100000000000
n=input("enter the name of account holder”)
p=int(input("enter the phone number”))
e=input("enter the email of account holder”)
ad=input(“enter the address of account holder")
b=int(input("enter the balance'))
t=input(“enter whether loan taken or not”)
query=”insert into acct_holder values({},‘{}’,{},’{}’,’{}’,{})”.
format(a,n,p,e,ad,b,t)
cu.execute (query)
dbo.commit()
print(“Successfully new account was added”)

#TO SEE THE FEEDBACKS OF THE USERS


def view_feedback():
dbo=con.connect (host=”localhost”, user=”root”, password=”admin”,
database=”bank_management_system”)
cu=dbo.cursor()
query=”select * from feedback”
cu.execute (query)
for data in cu:
12
print("Account number”, data [0])
print("Feedback", data[1])

#TO VIEW THE LOAN DETAILS OF THE USER


def view_loan_details ():
dbo=con.connect(host=”localhost", user=”root”, password="admin",
database="bank_management_system”)
cu=dbo.cursor()
query=”select * from loan_acct”
cu.execute (query)
for data in cu:
print("Account number”, data [0])
print("Account Holder Name”, data[1])
print("Loan Taken”, data [2])
print("Type of Loan”, data [3])
print("Status of Loan”, data[4])
print("Number of months from which loan's interest not paid”, data [5])

#TO CHANGE THE LOAN STATUS OF THE USER


def update_status_loan():
dbo=con.connect(host=”localhost", user=”root”, password="admin",
database="bank_management_system)
cu=dbo.cursor()
number=int(input(“enter the account number”))
stat=input(“the status of the loan cleared or pending”)
query=update loan_acct set status_of_loan=(‘{}’) where acct_no=”{}”
cu.execute (query.format(stat, number))
dbo.commit()
print('Successfully updated loan status")
13
#TO CHECK THE LOAN DEFAULTERS
def status_loan_defaulters():
dbo=con.connect(host=”localhost”, user=”root”, password="admin",
database="bank_management_system")
cu=dbo.cursor()
m=int(input(“enter the number of months "))
query=”select * from loan_acct where
number_of_months_from_which_interest_is_not_paid>={}".format(m)
cu. execute (query)
for data in cu:
print(“Account number”, data [0])
print("Account Holder Name”, data [1])
print(“Loan Taken”, data [2])
print(“Type of Loan”, data [3])
print(“Status of Loan”, data [4])
print(“Humber of months from which loan's interest not paid”, data [5])

#TO ADD NEW DATA FOR LOAN


def add_data_loan():
dbo=con.connect (host=”localhost”, user=”root”, password=”admin”,
database="bank_management_system)
cu=dbo.cursor()
a=int(input(“enter the account number:”))
n=input(“enter the name of account holder:”)
p=int(input("enter amount of loan taken: "))
e=input(“enter the type of loan:")
ad=input("enter the status of loan: ")
b=int(input("enter the number of months from which loan's interest not paid:”))
query=”insert into loan_acct values({},’{}’,{},’{}’,’{}’,{}).format(a,n,p,e,ad,b)
14
cu. execute (query)
dbo.commit()
print("Successfully added loan data")
#ADMIN MENU
def admin():
while True:
print(“*WELCOME ADMIN TO BANK MANAGEMENT SYSTEM*”)
print("Enter 1 adding the data of new accounts:”)
print("Enter 2 for viewing data of account holder's loan:")
print(“Enter 3 for updating status of loan lend:”)
print("Enter 4 for viewing details of loan defaulters:”)
print("Enter 5 for viewing feedback of users:")
print("Enter 6 adding the data of new accounts into loan accounts:")
print("Enter 7 for exiting:”)
ch=int(input("Enter your choice”))
if ch==1:
add_data()
elif ch==2:
view_loan_details()
elif ch==3:
update_status_loan()
elif ch==4:
status_loan_defaulters()
elif ch==5:
view_feedback()
elif ch==6:
add_data_loan()
else:
break
15
#USER MENU
def user1():
print("\t*WELCOME USER TO BANK MANAGEMENT SYSTEM*”)
print("")
print("---WELCOME USERMENU---“)
print("Enter 1 for viewing your bank account data")
print("Enter 2 for updating the name”)
print("Enter 3 for updating the email")
print("Enter 4 for updating the phone number”)
print("Enter 5 for updating the address")
print("Enter 6 for giving feedback")
print("Enter 7 for viewing the status of your loan")
ch=int(input("Enter your choice:”))
if ch==1:
view_data()
elif ch==2:
update_name()
elif ch==3:
update_email()
elif ch==4:
update_phone_number()
elif ch==5:
update_adress()
elif ch==6:
give_feedback()
elif ch==7:
view_loan_status()

16
#MAIN MENU
while True:
print(“***MAIN MENU***”)
print("Enter 1 to open for admin”)
print("Enter 2 to open for user”)
print("Enter 3 for exit”)
inp=int(input("Enter your choice”))
if inp==1:
print(“Enter username”)
user=input("")
print("Enter password”)
pasw=input("")
dbo=con.connect(host=”localhost”, user=”root”, password=”'admin”,
database="Bank_management_system”)
cu=dbo.cursor()
query=”select * from admin_data"
cu.execute (query)
for data in cu:
if data[0]==user and data[1]==pasw:
admin()

if inp==2:
print("Enter username")
user=input("")
print("Enter password")
pasw=input(“”)
dbo=con.connect(host=”localhost”, user = “root”, password= “admin”,
database="bank_management_system”)
cu=dbo.cursor()
17
query=”select * from user_data”
cu.execute(query)
for data in cu:
if data[0]==user and data[1]==pasw:
user1()

if inp==3:
print(“Thank you”)
break

18
OUTPUT

19
MAIN MENU:
---WELCOME TO BANK MANAGEMENT SYSTEM---
***MAIN MENU***
Enter 1 to open for admin
Enter 2 to open for user
Enter 3 for exit
Enter your choice 1
Enter username
admin 1
Enter password
Password 1

ADMIN MENU:
*WELCOME ADMIN TO BANK MANAGEMENT SYSTEM*
Enter 1 adding the data of new accounts:
Enter 2 for viewing data of account holder's loan:
Enter 3 for updating status of loan lend:
Enter 4 for viewing details of loan defaulters:
Enter 5 for viewing feedback of users:
Enter 6 adding the data of new accounts into loan accounts:
Enter 7 for exiting:

ADDING THE DATA OF NEW ACCOUNT:


*WELCOME ADMIN TO BANK MANAGEMENT SYSTEM*
Enter 1 adding the data of new accounts:
Enter 2 for viewing data of account holder's loan:
Enter 3 for updating status of loan lend:
Enter 4 for viewing details of loan defaulters:
Enter 5 for viewing feedback of users:
20
Enter 6 adding the data of new accounts into loan accounts:
Enter 7 for exiting:
Enter your choicel
enter the name of account holdersk
enter the phone number7532195861
enter the email of account [email protected]
enter the address of account holderKamapali
enter the balance7000
enter whether loan taken or notyes
Successfully new account was added

FOR VIEWING DATA OF ACCOUNT HOLDERS LOAN:


*WELCOME ADMIN TO BANK MANAGEMENT SYSTEM*
Enter 1 adding the data of new accounts:
Enter 2 for viewing data of account holder's loan
Enter 3 for updating status of loan tend:
Enter 4 for viewing details of loan defaulters:
Enter 5 for viewing feedback of user:
Enter 6 adding the data of new accounts into loan accounts:
Enter 7 for exiting:
Enter your choice2
Account number 741258944.0
Account Holder Name goutam
Loan Taken 1000.0
Type of Loan personal loan
Status of Loan Pending
Number of months from which loan's interest not paid 5.0
Account number 7536216064.0
Account Holder Name Aditya
21
Loan Taken 1000.0
Type of Loan Home Loan
Status of Loan cleared
Number of months from which loan's interest not paid 10.0
Account number 123456790528.0
Account Holder Name John Doe
Loan Taken 0.0
Type of Loan Personal Loan
status of Loan cleared
Number of months from which loan's interest not paid 0.0
Account number 234567892992.0
Account Holder Name Jane Smith
Loan Taken 5000.0
Type of Loan Home Loan
Status of Loan Pending
Number of months from which loan's interest not paid 2.0

FOR UPDATING STATUS OF LOAN LEND:


*WELCOME ADMIN TO BANK MANAGEMENT SYSTEM*
Enter 1 adding the data of new accounts:
Enter 2 for viewing data of account holder's loan:
Enter 3 for updating status of loan lend:
Enter 4 for viewing details of loan defaulters:
Enter 5 for viewing feedback of users:
Enter 6 adding the data of new accounts into loan accounts:
Enter 7 for exiting:
Enter your choice3 enter the account number 123456790528
the status of the loan cleared or pending PENDING
Successfully updated loan status
22
FOR VIEWING DETAILS OF LOAN DEFAULTERS:
*WELCOME ADMIN TO BANK MANAGEMENT SYSTEM*
Enter 1 adding the data of new accounts:
Enter 2 for viewing data of account holder's loan:
Enter 3 for updating status of loan lend:
Enter 4 for viewing details of loan defaulters:
Enter 5 for viewing feedback of users:
Enter 6 adding the data of new accounts into loan accounts:
Enter 7 for exiting:
Enter your choice4
Enter the number of months 5
Account number 741258944.0
Account Holder Name goutam
Loan Taken 1000.0
Type of Loan personal loan Status of Loan Pending
Number of months from which loan's interest not paid 5.0
Account number 7536216064.0
Account Holder Name Aditya
Loan Taken 1000.0
Type of Loan Home loan
Status of Loan cleared
Number of months from which loan's interest not paid 10.0

FOR VIEWING FEEDBACK OF USERS:


*WELCOME ADMIN TO BANK MANAGEMENT SYSTEM*
Enter 1 adding the data of new accounts:
Enter 2 for viewing data of account holder's loan:
Enter 3 for updating status of loan lend:
Enter 4 for viewing detials of loan defaulters:
23
Enter 5 for viewing feedback of users:
Enter 6 adding the data of new accounts into loan accounts:
Enter 7 for exiting:
Enter your choice5
Account number 123456790528.0
Feedback It was very smooth to use the system created
Account number 234567892992.0
Feedback It was good but a lot of scope of improvement
Account number 366275559424.0
Feedback Nice work very good experience
Account number 393924640768.0
Feedback Need to improve
Account number 530818269184.0
Feedback Very good experience
Account number 700400599040.0
Feedback Very nice facilities experience

ADDING THE DATA OF NEW ACCOUNTS IN TO LOAN ACCOUNTS:


*WELCOME ADMIN TO BANK MANAGEMENT SYSTEM*
Enter 1 adding the data of new accounts:
Enter 2 for viewing data of account holder's loan:
Enter 3 for updating status of loan lend:
Enter 4 for viewing detials of loan defaulters:
Enter 5 for viewing feedback of users:
Enter 6 adding the data of new accounts into loan accounts:
Enter 7 for exiting:
Enter your choice6
enter the account number: 366275559424
enter the name of account holder:ashish
24
enter amount of loan taken:8000
enter the type of loan: Home loan
enter the status of loan:Cleared
enter the number of months from which loan's interest not paid:6
Successfully added loan data

USER MENU:
***MAIN MENU***
Enter 1 to open for admin
Enter 2 to open for user
Enter 3 for exit
Enter your choice2
Enter username User 1
Enter password Password 1

FOR VIEWING YOUR BANK:


*WELCOME USER TO BANK MANAGEMENT SYSTEM*
---WELCOME USER MENU---
Enter 1 for viewing your bank account data
Enter 2 for updating the name
Enter 3 for updating the email
Enter 4 for updating the phone number
Enter 5 for updating the address
Enter 6 for giving feedback

25
FOR UPDATING THE NAME:
*WELCOME USER TO BANK MANAGEMENT SYSTEM*
*WELCOME USER MENU*
Enter 1 for viewing your bank account data
Enter 2 for updating the name
Enter 3 for updating the email
Enter 4 for updating the phone number
Enter 5 for updating the addres
Enter 6 for giving feedback
Enter 7 for viewing the status of your loan
Enter your choice:2
Enter the account number 366275559424
Enter the updated name Mohit
enter 1 for user menu
enter 2 for exit: 1
Name successfully updated

FOR UPDATING THE MAIL:


*WELCOME USER TO BANK MANAGEMENT SYSTEM*
---WELCOME USER MENU---
Enter 1 for viewing your bank account data
Enter 2 for updating the name
Enter 3 for updating the email
Enter 4 for updating the phone number
Enter 5 for updating the address
Enter 6 for giving feedback
Enter 7 for viewing the status of your loan
Enter your choice:3
Enter the updated [email protected]
26
Enter the account number 366275559424
Email successfully updated
enter 1 for user menu:
enter 2 for exit: 1
Enter 7 for viewing the status of your loan
Enter your choice:1
Enter the account number 366275559424
Account number 366275559424
Name of account holder ashish
Phone number 8523697664.0
Email [email protected]
Address omm sahu
Intial balance 8000.0
Loan Taken no
enter 1 for user menu:
enter 2 for exit: 1

FOR UPDATING THE PHONE NUMBER:


*WELCOME USER TO BANK MANAGEMENT SYSTEM*
---WELCOME USER MENU---
Enter 1 for viewing your bank account data
Enter 2 for updating the name
Enter 3 for updating the email
Enter 4 for updating the phone number
Enter 5 for updating the address
Enter 6 for giving feedback
Enter 7 for viewing the status of your loan
Enter your choice: 4
Enter the updated phone number7008116936
27
Enter the account number 366275559424
Phone number successfully updated
enter 1 for user menu:
enter 2 for exit: 1

FOR UPDATING THE ADDRESS:


---WELCOME USER MENU---
Enter 1 for viewing your bank account data
Enter 2 for updating the name
Enter 3 for updating the email
Enter 4 for updating the phone number
Enter 5 for updating the address
Enter 6 for giving feedback
Enter 7 for viewing the status of your loan
Enter your choice:5
Enter the updated addressGajapati Nagar
Enter the account number 366275559424
Address was updated successfully
enter 1 for user menu:
enter 2 for exit: 1

FOR GIVING FEEDBACK:


WELCOME USER TO BANK MANAGEMENT SYSTEM
---WELCOME USER MENU---
Enter 1 for viewing your bank account data
Enter 2 for updating the name
Enter 3 for updating the email
Enter 4 for updating the phone number
Enter 5 for updating the address
28
Enter 6 for giving feedback
Enter 7 for viewing the status of your loan
Enter your choice: 6
Enter your account number: 714367139845
Enter your feedback
Thank you for your awesome service
Thank you for your feedback

29
REFERENCE

1. Computer science With Python Class XII By: Sumita Arora

2. Wikipedia

https://www.wikipedia.org/

3.Python

https://www.python.org/

4.MySQL

https://www.mysql.com/

30

You might also like