Bank Management System
Bank Management System
Bank Management System
PROJECT REPORT ON
“BANKING MANAGEMENT SYSTEM”
NAME :
ROLL NO :
PAGE- 1
CERTIFICATE
PAGE- 2
ACKNOWLEDGEMENT
PAGE- 3
INDEX
SR NO. CONTENTS
1. INTRODUCTION
i. ABOUT PYTHON
ii. ABOUT MYSQL
iii. ABOUT BANK MANAGEMENT
SYSTEM
2. SOURCE CODE
3. OUTPUT
4. BIBLIOGRAPHY
PAGE- 4
INTRODUCTION
ABOUT PYTHON:
PAGE- 5
ABOUT MYSQL:
MySQL works very quickly and works well even with large
data sets.
PAGE- 6
can handle it) to a theoretical limit of 8 million terabytes
(TB).
PAGE- 7
SOURCE CODE
IMPLEMENTATION:
import pickle
import os
import pathlib
class Account :
accNo = 0
name = ''
deposit=0
type = ''
def createAccount(self):
print("\n\n\nAccount Created")
PAGE- 8
def showAccount(self):
print("Type of Account",self.type)
print("Balance : ",self.deposit)
def modifyAccount(self):
def depositAmount(self,amount):
self.deposit += amount
def withdrawAmount(self,amount):
self.deposit -= amount
PAGE- 9
def report(self):
def getAccountNo(self):
return self.accNo
def getAcccountHolderName(self):
return self.name
def getAccountType(self):
return self.type
def getDeposit(self):
return self.deposit
def intro():
print("\t\t\t\t**********************")
print("\t\t\t\t**********************")
PAGE- 10
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)
infile.close()
PAGE- 11
else :
def displaySp(num):
file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
mylist = pickle.load(infile)
infile.close()
found = False
if item.accNo == num :
found = True
else :
if not found :
PAGE- 12
print("No existing record with this number")
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')
if item.accNo == num1 :
if num2 == 1 :
item.deposit += amount
elif num2 == 2 :
PAGE- 13
if amount <= item.deposit :
item.deposit -=amount
else :
else :
outfile = open('newaccounts.data','wb')
pickle.dump(mylist, outfile)
outfile.close()
os.rename('newaccounts.data', 'accounts.data')
def deleteAccount(num):
file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
oldlist = pickle.load(infile)
PAGE- 14
infile.close()
newlist = []
if item.accNo != num :
newlist.append(item)
os.remove('accounts.data')
outfile = open('newaccounts.data','wb')
pickle.dump(newlist, outfile)
outfile.close()
os.rename('newaccounts.data', 'accounts.data')
def modifyAccount(num):
file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
oldlist = pickle.load(infile)
infile.close()
os.remove('accounts.data')
PAGE- 15
for item in oldlist :
if item.accNo == num :
outfile = open('newaccounts.data','wb')
pickle.dump(oldlist, outfile)
outfile.close()
os.rename('newaccounts.data', 'accounts.data')
def writeAccountsFile(account) :
file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
oldlist = pickle.load(infile)
PAGE- 16
oldlist.append(account)
infile.close()
os.remove('accounts.data')
else :
oldlist = [account]
outfile = open('newaccounts.data','wb')
pickle.dump(oldlist, outfile)
outfile.close()
os.rename('newaccounts.data', 'accounts.data')
ch=''
num=0
intro()
while ch != 8:
#system("cls");
PAGE- 17
print("\tMAIN MENU")
print("\t8. EXIT")
ch = input()
#system("cls");
if ch == '1':
writeAccount()
elif ch =='2':
depositAndWithdraw(num, 1)
PAGE- 18
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':
break
else :
PAGE- 19
print("Invalid choice")
PAGE- 20
OUTPUT:
PAGE- 21
PAGE- 22
PAGE- 23
PAGE- 24
BIBLIOGRAPHY
BOOKS:
SUMITA ARORA-COMPUTER SCIENCE WITH
PYTHON
ARIHANT- ALL IN ONE COMPUTER SCIENCE CBSE
INTERNET:
WEBSITE: WWW.PYTHON.ORG
WEBSITE: WWW.WIKIPEDIA.ORG
PAGE- 25