Diwali Project
Diwali Project
Connector
and versatility, serves as the ideal frontend language for developing user-
1
scalable database solution, ensuring the secure storage and retrieval of
2
FUNCTIONS LIST
USER FUNCTIONS
input.
reconciliation.
3
ADMIN FUNCTIONS
accurate record-keeping.
period.
4
HARDWARES AND SOFTWARES REQUIRED
HARDWARES
1. Desktop Computer/Laptop
2. Windows 11
SOFTWARES
1. Python
2. MySQL
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
9
if n==2:
return
11
if n==2:
return
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:
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
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
29
REFERENCE
2. Wikipedia
https://www.wikipedia.org/
3.Python
https://www.python.org/
4.MySQL
https://www.mysql.com/
30