0% found this document useful (0 votes)
7 views21 pages

Bank Management System (BMS)

Uploaded by

atomicislost
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views21 pages

Bank Management System (BMS)

Uploaded by

atomicislost
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Computer Science

New
(Python)

A PROJECT ON

“BANK MANAGEMENT SYSTEM”


Submitted in partial rollback in fulfillment of the
requirement for the

SENIOR SECONDARY
EXAMINATION
(AISSCE) (2021-
2022)

Submitted By :
Roll No :
CERTIFICAT
E
.

This is to certify that the project titled


“Bank
Management
System”
submitted by

having roll no
___________________
of CLASS XII has completed this project for
partial rollback in fulfillment of the
requirement for the senior secondary
Internal External
Supervisor examination Supervisor
Signa Signa
ture
(AISSCE) ture
2021-22 embodies the bonafide
work done by him/her under my
Na Na
me supervision. me
:Dat Dat
:
e: e:
ACKNOWLEDGEMENT

It would be our outmost pleasure to


express our sincere thanks to our
PGT Computer Science Teacher in
providing a helping hand in this
project.

His unflagging patience,


creativity and immense knowledge
that he shared with us have proved
highly beneficial to us and have
made our Project possible and
successful.
CONTENT

1. Bonafide
certificate

2. Acknowledgeme
nt

3. Introduction

4. Operation

5. System
Analysis

6. Source Code
8 Conclusi
. on
7.
9.
Output
Cd
Introducti
on

AIM OF THE PROJECT:


This project has been prepared as a
reqirement for AISSCE-2020-21.Its main
aim is to develop a python program
which manages the working of a Bank.

PURPOSE:
The purpose of this project is to ease the
management of a Bank. It uses Python
programming with SQL connectivity
concepts to make the work easier and
support the smooth functioning of a Bank.

This is Python Projects on Bank


Management system, which provided a lot
of facility to their Customer to manage their
accounts easily.
The objective and scope of my Project
Bank Management system is to record the
details various activities of customer. It
will simplify the task and reduce the paper
work.
OPERATIONS:

1. Open Bank Account - Open New Bank account by


entering follwing details:-
a. Account No.
b. Customer Name
c. Nominee Name
d. Date of Birth
e. Opening Balance
ammount
f. Mobile no.

2. Deposit Amount - We can deposit amount using


account
no.

3. Withdraw Amount - We can withdraw amount


using
account no

4. Balance Enquiry - We can know our balance


using
5. View customer details - We can view any customer
details using account no.
6. View List of customers - We can view list of all
customers.

7. View customer details - We can modify following


customer details using account
no. :-
a. Customer Name
b. Nominee Name
c. Date of Birth
d. Mobile No.

8. Close an Account - We can Delete any customer


details using account no.

9. Exit - To close the application.


SYSTEM
DESIGN
Bank
Management
System

Python Program SQL Relation

Methods Database
(BANK)

Relation
open_acc()
(SBI)

deposit()

withdraw()

enquiry()

view()

list_all()

modify()

close_acc()
BANK MANAGEMENT SYSTEM
(SOURCE CODE)

import os
import mysql.connector as sc
import datetime as dt

#Function to check availibity of a roll no.


def checkacc(acc):
con=sc.connect(host='localhost',user='root',passwd='12345',database='Bank')
cur=con.cursor()
cur.execute("Select count(*) from sbi where acc_no={} ".format(acc))
data=cur.fetchall()
d=data[0][0]
con.close()
return d

#Function to open bank account


def open_acc():
os.system('cls')
ch='y'
while ch=='y' or ch=='Y':
con=sc.connect(host='localhost',database='bank',user='root',password='12345')
cur=con.cursor()
try:
os.system('cls')
print('************************************************************')
print('* Bank Management System *')
print('************************************************************')
accno=int(input(" Enter Account No. \t\t\t: "))
accno=int("100220"+str(accno))
while checkacc(accno):
print(" Entered Account No. already
Exits ") accno=int(input(" Enter Account No.
\t\t\t: ")) accno=int("100220"+str(accno))

name=input(" Enter Customer Name\t\t\t: ")


nname=input(" Enter Nominee Name\t\t\t: ")
dob=input(" Enter Date of birth (yyyy-mm-
dd)\t: ") balance=float(input("Enter Opening
Balance\t\t: ")) mob=input(" Enter
Mobile no. \t\t\t: ") ifsc="SBIN0002020"
df=dt.date.today()
if df.month<10:
opdate=str(df.year)+"-0"+str(df.month)+"-"+str(df.day)
else:
opdate=str(df.year)+"-"+str(df.month)+"-"+str(df.day)
cur.execute("insert into sbi(acc_no,name,open_date,nominee,ifsc,dob,balance,mob)
values({},'{}','{}','{}','{}','{}',{},'{}')".format(accno,name,opdate,nname,ifsc,dob,balance,mob))
con.commit()
print('************************************************************')
print("\t\tAccount Opened Succesfully")
print('************************************************************')
ch=input("\tDo you want to open another account?(y/n)")
con.close()
except:
print('**
*********
*********
*********
*********
*********
*********
****')
print("\t\tError!!!... during Account opening.")
print('************************************************************')
#Function to deposit money
ch=input("\tDo
def deposit(): you want to try with another data?(y/n)")
ch='y'
while ch=='y' or ch=='Y':
try:
con=sc.connect(host='localhost',user='root',password='12345',database='bank')
cur=con.cursor()
os.system('cls')
print('************************************************************')
print('* Bank Management System *')
print('************************************************************')
accno=int(input(' Enter the Account no. for deposit :- '))
accno=int("100220"+str(accno))
while checkacc(accno)==0:
print(" Entered Account no. Not Exits ")
accno=int(input(' Enter correct Account no. for
deposit :- ')) accno=int("100220"+str(accno))
amount=float(input(' Enter the Amount :- '))
cur.execute("update sbi set balance=balance+{} where
acc_no={}".format(amount,accno))
con.commit()
print('************************************************************')
print("\t\tAmmount Succesfully Deposited")
print('************************************************************')
ch=input("\tDo you want to deposit more amount?(y/n)")
con.close()
except:
print('***********************************************************
*') print("\t\tError!!!... during depositing.")
print('************************************************************')
ch=input("\tDo you want to try with another data?(y/n)")

#Function to withdraw
money def withdraw():
ch='y'
while ch=='y' or ch=='Y':
try:
con=sc.connect(host='localhost',user='root',password='12345',database='bank')
cur=con.cursor()
os.system('cls')
print('************************************************************')
print('* Bnak Management System *')
print('************************************************************')
accno=int(input(' Enter the Account no. for Withdraw :- '))
accno=int("100220"+str(accno))
while checkacc(accno)==0:
print(" Entered Account no. Not Exits ")
accno=int(input(' Enter correct Account no. for
Withdraw :- ')) accno=int("100220"+str(accno))
amount=float(input(' Enter the Amount :- '))
cur.execute("update sbi set balance=balance-{} where
acc_no={}".format(amount,accno))
con.commit()
print('************************************************************')
print("\t\tAmmount Succesfully withdrawn")
print('************************************************************')
ch=input("\tDo you want to withdraw more amount?(y/n)")
con.close()
except:
print('**
*********
*********
*********
*********
*********
*********
****')
print("\t\tError!!!... during withdraw.")
print('************************************************************')
ch=input("\tDo you want to try with another data?(y/n)")

#Function to view
balance def enquiry():
ch='y'
while ch=='y' or ch=='Y':
try:
cur=con.cursor()
os.system('cls')
print('************************************************************')
print('* Bank Management System *')
print('************************************************************')
accno=int(input('Enter the Account no. for Balance Enquiry :- '))
accno=int("100220"+str(accno))
while checkacc(accno)==0:
print(" Entered Account no. Not Exits ")
accno=int(input(' Enter correct Account no. for Balance Enquiry :-
')) accno=int("100220"+str(accno))
cur.execute("Select name,balance from sbi where acc_no={}".format(accno))
data=cur.fetchone()
os.system('cls')
print('************************************************************')
print('* Balance Enquiry *')
print('************************************************************')
print(' Account No. : ',accno)
Name : ',data[0])
print(' Balance : ',data[1])
print('************************************************************')
print('
ch=input("\tDo you want to View another record?(y/n)")
con.close()
except:
print('***********************************************************
*') print("\t\tError!!!... during enquiry.")
print('************************************************************')
ch=input("\tDo you want to try with another data?(y/n)")

#Function to view customer details


def view():
ch='y'
while ch=='y' or ch=='Y':
try:
con=sc.connect(host='localhost',user='root',password='12345',database='bank')
cur=con.cursor()
os.system('cls')
print('************************************************************')
print('* Bank Management System *')
print('************************************************************')
accno=int(input(' Enter the Account no. for Customer Details :- '))
accno=int("100220"+str(accno))
while checkacc(accno)==0:
print(" Entered Account no. Not Exits ")
accno=int(input(' Enter correct Account no. for Customer Details :-
'))
accno=int("100220"+str(accno))
cur.execute("Select * from sbi where acc_no={}".format(accno))
data=cur.fetchone()
os.system('cls')
print('************************************************************')
print('* Customer Details *')
print('************************************************************')
print(' Account No. : ',data[0])
Name : ',data[1])
print(' Acc. Active from : ',data[2])
Nominee Name : ',data[3])
print(' IFSC : ',data[4])
Date of Birth : ',data[5])
print(' Balance : ',data[6])
Mobile : ',data[7])
print('
print('************************************************************')
ch=input("\tDo you want to View another record?(y/n)")
print('
con.close()
except:
print('
print('***********************************************************
*') print("\t\tError!!!... during viewing.")
print('
print('************************************************************')
ch=input("\tDo you want to try with another data?(y/n)")

#Function to view list of customer


def list_all():
ch='y'
while ch=='y' or ch=='Y':
try:
con=sc.connect(host='localhost',user='root',password='12345',database='bank')
cur=con.cursor()
os.system('cls')
print('************************************************************')
print('* Bnak Management System *')
print('************************************************************')
cur.execute("Select acc_no,name from sbi ")
data=cur.fetchall()
os.system('cls')
print('************************************************************')
print('* List of Customers *')
print('************************************************************')
print('\t\t Acc No.\t Name')
print('

') print('\t\t ',end="")


for row in data:
for d in row:
print(d,end='\t ')
print()
if not row==data[-1]:
print('\t\t ',end="")
print('************************************************************')
ch=input()
con.close()
except:
print('**
*********
*********
*********
*********
*********
*********
****')
print("\t\tError!!!... during Viewing.")
print('************************************************************')
ch=input("\tDo you want to try with another data?(y/n)")

#Function to modify account


details def modify():
ch='y'
while ch=='y' or ch=='Y':
try:
con=sc.connect(host='localhost',user='root',password='12345',database='bank')
cur=con.cursor()
os.system('cls')
print('************************************************************')
print('* Bank Management System *')
print('************************************************************')
accno=int(input(' Enter the Account no. for Updating Details :- '))
print('* *')
accno=int("100220"+str(accno))
1. Name *')
while checkacc(accno)==0:
print('* 2. Nominee *')
print(" Entered Account no. Not Exits ")
3. Date of Birth *')
accno=int(input(' Enter correct Account no. for Updating
print('* 4. Mobile No. *')
Details :- ')) accno=int("100220"+str(accno))
*')
print('********************************************************
print('*
print('************************************************************')
****')
opt=int(input(' Enter Option :- '))
print('*
print('************************************************************')
if opt==1:
print('*
name=input("\t\tEnter new Name : ")
cur.execute("update sbi set name='{}' where acc_no={}".format(name,accno))
elif opt==2:
nname=input("\t\tEnter new Nominee Name : ")
cur.execute("update sbi set nominee='{}' where
acc_no={}".format(nname,accno))
elif opt==3:
dob=input("\tEnter new Date of Birth (yyyy-mm-dd) : ")
cur.execute("update sbi set dob='{}' where acc_no={}".format(dob,accno))
elif opt==4:
mob=input("\t\tEnter new Mobile No. : ")
cur.execute("update sbi set mob='{}' where
acc_no={}".format(mob,accno))

con.commit()
print('************************************************************')
print("\t\tDetails Succesfully Updated")
print('************************************************************')
ch=input("\tDo you want to Update another record?(y/n)")
con.close()
except:
print('***********************************************************
*') print("\t\tError!!!... during updating.")
print('************************************************************')
ch=input("\tDo you want to try with another data?(y/n)")

#Function to close a account


def close_acc():
ch='y'
while ch=='y' or ch=='Y':
try:
con=sc.connect(host='localhost',user='root',password='12345',database='bank')
cur=con.cursor()
os.system('cls')
print('************************************************************')
print('* Bank Management System *')
print('************************************************************')
accno=int(input(' Enter the Account no. for closure :- '))
accno=int("100220"+str(accno))
while checkacc(accno)==0:
print(" Entered Account no. Not Exits ")
accno=int(input(' Enter correct Account no. for
closure :- ')) accno=int("100220"+str(accno))
cur.execute("delete from sbi where acc_no={}".format(accno))
con.commit()
os.system('cls')
print('************************************************************')
print('* Bank Management System *')
print('************************************************************')
print('* *')
print('* Accounted Deleted Successfully *')
print('* *')
print('************************************************************')
ch=input("\tDo you want to delete another account?(y/n)")
con.close()
except:
print('***********************************************************
*') print("\t\tError!!!... during deleting account.")
print('************************************************************')
ch=input("\tDo you want to try with another data?(y/n)")

#Main

ch=1

while ch!=0 :
os.system('cls')
print('************************************************************')
print('* Bank Management System *')
print('************************************************************')
print('* *')
print('* 1. Open Bank Account *')
print('* 2. Deposit Amount *')
print('* 3. Withdraw Amount *')
print('* 4. Balance Enquiry *')
print('* 5. View Customer Details *')
print('* 6. View List of Customer *')
print('* 7. Modify Account Details *')
print('* 8. Close an Account *')
print('* 0. Exit

*')
print('************************************************************')
print('* *')
ch=int(input(' Enter Option :- '))

if ch==1:
open_acc()
elif ch==2:
deposit()
elif ch==3:
withdraw()
elif ch==4:
enquiry()
elif ch==5:
view()
elif ch==6:
list_al
l()
elif ch==7:
modify()
elif ch==8:
close_ac
c()

SQL CODE

create database bank;

create table SBI(


Acc_no int
primary key,
name varchar(30) not null,
open_date date,
nominee varchar(30),
IFSC varchar(30),
dob date,
balance float default 0.0,
mob varchar(13));
OUTPUT

1. Open Bank Account

Mr. XYZ
Mrs. PQR

2. Deposit Amount
3. Withdraw Amount

4. Balance Enquiry

Mr. XYZ

6. View customer details

Mr. XYZ

Mrs. PQR
7. View List of customers -

Mr. XYZ
Miss.
MNO
Mrs. ABC

8. View customer details

Mr.
UVW

9. Close an Account -
CONCLU
SION
This project is based on the usage of
Data Files in our day-to-day lives.
Hopefully it might be able to
demonstrate how to put into application
the concept of the features of python to
make our work easier. It consists of the
modular programming, SQL Connectivity
and other common features like
structure, loops,condition statements
etc. which handle all the transactions of
a Bank management including opening
an account and close it.
This concept can be utilised in
other institutions and
organisations making least
possible use of labour.
I hope it provides efficient
methods for storing data in a
concise

You might also like