Report On Bank Management System
Report On Bank Management System
“BANK MANAGEMENT
SYSTEM”
IN PYTHON
PAGE- 1
ACKNOWLEDGEMENT
PAGE- 2
INDEX
SR NO. CONTENTS PAGE NO.
1. INTRODUCTION 5-8 5-
i. ABOUT PYTHON 6
ii. ABOUT MYSQL 7-8
iii. ABOUT BANK
MANAGEMENT SYSTEM 9
3. OUTPUT 23-26
4. BIBLIOGRAPHY 27
PAGE- 3
INTRODUCTION
ABOUT PYTHON:
Python is an interpreted, object-oriented, high-level
programming language with dynamic semantics. Its high-level
built in data structures, combined with dynamic typing and
dynamic binding, make it very attractive for Rapid Application
Development, as well as for use as a scripting or glue language to
connect existing components together. Python's simple, easy to
learn syntax emphasizes readability and therefore reduces the
cost of program maintenance. Python supports modules and
packages, which encourages program modularity and code reuse.
The Python interpreter and the extensive standard library are
available in source or binary form without charge for all major
platforms, and can be freely distributed.
Often, programmers fall in love with Python because of the
increased productivity it provides. Since there is no compilation
step, the edit-test-debug cycle is incredibly fast. Debugging
Python programs is easy: a bug or bad input will never cause a
segmentation fault. Instead, when the interpreter discovers an
error, it raises an exception. When the program doesn't catch the
debugger allows inspection of local and global variables,
evaluation of arbitrary expressions, setting breakpoints, stepping
through the code a line at a time, and so on. The debugger is
written in Python itself, testifying to Python's introspective
power. On the other hand, often the quickest way to debug a
program is to add a few print statements to the source: the fast
edit-test-debug cycle makes this simple approach very effective.
PAGE- 5
ABOUT MYSQL:
• MYSQL WORKS VERY QUICKLY AND WORKS WELL EVEN WITH LARGE
DATA SETS.
PAGE- 6
but YOU CAN INCREASE THIS (IF YOUR OPERATING SYSTEM CAN HANDLE
IT) TO A THEORETICAL LIMIT OF 8 MILLION TERABYTES (TB).
SPECIFIC ENVIRONMENTS.
PAGE- 7
ABOUT BANK MANAGEMENT SYSTEM:
PAGE- 8
SOURCE CODE
import pickle
import os import
pathlib class
Account :
accNo = 0
name = ''
deposit=0
type = ''
def createAccount(self):
Created")
PAGE- 9
def showAccount(self):
: ",self.deposit)
def modifyAccount(self):
def depositAmount(self,amount):
self.deposit += amount
def withdrawAmount(self,amount):
PAGE- 10
self.deposit -= amount
def report(self):
def getAccountNo(self):
getAcccountHolderName(self):
getAccountType(self):
return self.type
def getDeposit(self):
return self.deposit
def intro():
print("\t\t\t\t**********************")
PAGE- 11
print("\t\t\t\tBANK MANAGEMENT SYSTEM") print("\t\t\t\
t**********************")
input()
def writeAccount():
account = Account()
account.createAccount()
writeAccountsFile(account)
def displayAll():
file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
mylist = pickle.load(infile)
PAGE- 12
for item in mylist :
infile.close()
else :
def displaySp(num):
file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
mylist = pickle.load(infile)
item.accNo == num :
PAGE- 13
",item.deposit) found = True
else :
if not found :
def depositAndWithdraw(num1,num2):
file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
mylist = pickle.load(infile)
infile.close()
os.remove('accounts.data') for
item in mylist :
if item.accNo == num1 :
if num2 == 1 :
PAGE- 14
amount to deposit : "))
item.deposit += amount
elif num2 == 2 :
item.deposit :
item.deposit -=amount
else :
else :
open('newaccounts.data','wb')
os.rename('newaccounts.data', 'accounts.data')
def deleteAccount(num):
PAGE- 15
file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
oldlist = pickle.load(infile)
item in oldlist :
if item.accNo != num :
newlist.append(item)
os.remove('accounts.data') outfile =
open('newaccounts.data','wb')
modifyAccount(num):
file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
oldlist = pickle.load(infile)
PAGE- 16
infile.close()
os.remove('accounts.data') for
== num :
outfile = open('newaccounts.data','wb')
os.rename('newaccounts.data',
'accounts.data')
def writeAccountsFile(account) :
file = pathlib.Path("accounts.data")
PAGE- 17
if file.exists ():
infile = open('accounts.data','rb')
oldlist = pickle.load(infile)
oldlist.append(account) infile.close()
os.remove('accounts.data')
else :
open('newaccounts.data','wb')
pickle.dump(oldlist, outfile)
outfile.close()
os.rename('newaccounts.data',
'accounts.data')
num=0
intro()
PAGE- 18
while ch != 8: #system("cls"); print("\
ACCOUNT")
#system("cls");
if ch == '1':
writeAccount()
elif ch =='2':
PAGE- 19
num = int(input("\tEnter The account No. : "))
depositAndWithdraw(num, 1)
elif ch == '3':
depositAndWithdraw(num, 2)
elif ch == '4':
displaySp(num)
elif ch == '5':
displayAll(); elif
ch == '6':
deleteAccount(num)
elif ch == '7':
modifyAccount(num)
elif ch == '8':
PAGE- 20
print("\tThanks for using bank managemnt system")
break
else :
print("Invalid choice")
OUTPUT
PAGE- 21
PAGE- 22
PAGE- 23
PAGE- 24
BIBLIOGRAPHY
BOOKS:
WEBSITE: WWW.PYTHON.ORG
WEBSITE: WWW.WIKIPEDIA.ORG
PAGE- 25