0% found this document useful (0 votes)
62 views32 pages

Pawan Report

This document contains the code and documentation for a student's computer science investigatory project on a Bank Management System using Python. It includes sections for the certificate, undertaking, acknowledgement, synopsis, system requirements, introduction to the project, information about Python, the coding, outputs, limitations and future enhancements, and bibliography. The coding section shows classes for Accounts and Users, functions for loading and saving user data and account information to binary files, and a main program loop that allows users to perform actions like creating new accounts, depositing/withdrawing money, checking balances, and modifying accounts.

Uploaded by

ak978420
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)
62 views32 pages

Pawan Report

This document contains the code and documentation for a student's computer science investigatory project on a Bank Management System using Python. It includes sections for the certificate, undertaking, acknowledgement, synopsis, system requirements, introduction to the project, information about Python, the coding, outputs, limitations and future enhancements, and bibliography. The coding section shows classes for Accounts and Users, functions for loading and saving user data and account information to binary files, and a main program loop that allows users to perform actions like creating new accounts, depositing/withdrawing money, checking balances, and modifying accounts.

Uploaded by

ak978420
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/ 32

PM SHRI KENDRIYA VIDYALAYA

SIDDHARTHNAGAR
COMPUTER SCIENCE INVESTIGATORY
PROJECT

SUbMITTED bY:-
PAWAN KUMAR
CLASS xII A
(2023-24)
ROLL NO:-

1
TABLE OF CONTENTS
Certificate

Undertaking

Acknowledgement

Synopsis & System Requirements

Introduction

About Python

Coding

Outputs

Limitations & Future Enhancement

Bibliography

2
Certificate

This is to certify that PAWAN KUMAR of class XII (A)


Science, PM Shri Kendriya Vidyalaya Siddharthnagar,
have successfully completed his project “Bank
Management System” in computer science practical
for the AISSCE as prescribed by CBSE in the year
2023-24.
Date :
Roll No. :

_____________________
Signature of Principal

___________________ ___________________
Signature of Internal Signature of External
Examiner Examiner

3
Undertaking

I declare that the work presented in this project titled


BANK MANAGEMENT SYSTEM, submitted to Mr. D. K.
Jaiswal (PGT- Computer Science), PM Shri Kendriya
Vidyalaya Siddharthnagar for the award of the CBSE –
AISSCE class XII certificate. I have not plagiarized or
submitted the same work for the award of any other
examination. In case this undertaking is found
incorrect, we accept that our Certificates may be
unconditionally withdrawn.

4
Acknowledgement

It would be my utmost pleasure to express my sincere


thanks to my Principal Shri Niraj Kumar Shukla sir for
his valuable guidance and motivation. I would also
give my sincere thanks to my Computer Science
Teacher Mr. D K Jaiswal (PGT CS) sir, for providing a
helping hand in this project. Her valuable guidance,
support and supervision all through this project titled
“Bank Management System”, are responsible for
attaining its present form. This project has been made
not only for fetching marks but also for knowledge.
Finally, I would like to thank CBSE for giving me this
opportunity to undertake this project.

____________________
(Signature of Student)
PAWAN KUMAR

5
SYNOPSIS

The main objective of the Bank Management


System is to manage the regular details needed in
functionalities of the bank. Various details will be
entered and saved in permanent record storage. It
manages all the information of the account holder.
The system will allow users to efficiently manage
and organize their various details, providing
functionalities such as adding, searching, updating,
and deleting records. The Binary File system will be
utilized to store and retrieve all the records and
information securely.
The project is totally built at administrative end and
thus only the administrator is guaranteed the access.
The purpose of the project is to build an
application program to reduce the manual work for
managing the records in bank. At initial level this
project will handle the organized details of the
account holders. At the later stage, its functionality
may be enhanced.
The program will do multiple tasks like creating a
new record, searching records on various
6
parameters, deleting the details based on
parameters. We have decided that this project
should be easily used by the user so it will be user
friendly.
The purpose of a Bank Management system is like
having a smart helper for banks. This helper keeps
a record of everyone's money, helps people put
money into their accounts, take money out, and
makes sure everything is safe and secure. Think of
it as your personal assistant to act smartly in bank.

7
SYSTEM REQUIREMENTS

HARDWARE REQUIRED

 Printer, to print the required documents of the


project
 Pen Drive
 Processor : AMD
 RAM : 4 GB
 Hard Disk : 1 TB.

SOFTWARE REQUIRED

 Operating system : Windows 10


 Python 3.6.7 – IDLE
 MS Word, for presentation

8
INTRODUCTION

Bank Management System project is written in


Python. The project file contains a python
script. This is a simple GUI based project
which is very easy to understand and
use. Talking about the system, it contains all
the required functions which include adding,
viewing, deleting and searching the records.
This is the report of the coursework designed
to produce a system or an application that
handles Bank Management System. It is a
management information system for personal
file establishments to manage contact data. It
administers user’s institution smoothly. This
project aims to develop a comprehensive Bank
Management System using Python with Binary
File system. The system will allow users to
efficiently manage and organize bank related
records providing functionalities such as

9
adding, searching, updating, and deleting
details.
It helps you do things like checking how much
money you have, putting more money into
your account (like when you get your
allowance), taking money out (when you need it
for something special), and making sure that
bad things, like people trying to take your
money without permission, don't happen.
Moreover, this helper makes banking more
Convenient by allowing you to do these things
not just at the bank but also using a computer
or even your phone. So, the purpose is to
make banking simple, safe.
Bank Management System implemented in
Python using a binary file for data storage.
Here's an overview of the key components:

1. **Account Class:**
- Represents a bank account with attributes
such as account number, account holder name,

10
account type (Checking/Saving), and account
balance.
- Provides methods for creating an account,
displaying account details, modifying account
information, depositing and withdrawing
amounts, and generating an account report.

2. **User Class:**
- Represents a user with a username and
password. Used for basic authentication in your
system.

3. **Functions:**
- **intro():** Displays the introduction
message for the Bank Management System.
- **save_users(users):** Saves user
information to a binary file named "users.data."
- **load_users():** Loads user information
from the "users.data" file.
- **register():** Allows a user to register by
entering a new username and password.
11
- **login():** Authenticates a user by
checking the entered username and password
against stored user data.
- **writeAccount():** Creates a new bank
account and writes it to the "accounts.data" file.
- **displayAll():** Displays details of all
existing accounts.
- **displaySp(num):** Displays the balance
for a specific account number.
- **depositAndWithdraw(num1, num2):**
Allows depositing or withdrawing an amount
from a specific account.
- **deleteAccount(num):** Closes an
account based on the account number.
- **modifyAccount(num):** Modifies
account details based on the account number.
- **writeAccountsFile(account):** Writes
account information to the "accounts.data" file.

4. **Main Program Loop:**

12
- Utilizes a while loop to present a menu of
options to the user.
- Options include creating a new account,
depositing or withdrawing money, checking
balance, displaying account holders, closing an
account, modifying an account, and exiting the
program.

5. **File Handling:**
- Uses binary files ("users.data" and
"accounts.data") to store user authentication
data and account information, respectively.
- Pickle module is employed for serializing
and deserializing Python objects to/from binary
files.

6. **User Interaction:**
- Interacts with the user through input
prompts and provides feedback on actions
performed.

13
The project employs basic authentication, and
the password is entered in plaintext. In a real-
world scenario, it is advisable to use more
secure authentication mechanisms and store
passwords securely.

14
ABOUT PYHTON

Python is an interpreted language as python


programs are executed by an interpreter. Thus,
Python interpreter should be installed on the
computer system to write and run python programs.
We have also learnt that Python IDLE (Integrated
Development and Learning Environment) provides
two working modes interactive mode (popularly
known as python shell) and script mode.
Binary File system is used for permanent storage of
the data and records. This file system is very much
appropriate to store data in computer. This file
system provides many functions, helping to manage
the records and regular updations and
modifications.

15
CODING

# A Computer Science Project by KV SDDN


# of class 12th on "Bank Managment System" using Python and Binary File
import pickle
import os
import pathlib
class Account :
accNo = 0
name = ''
deposit=0
type = ''

def createAccount(self):
self.accNo= int(input("Enter the account no : "))
self.name = input("Enter the account holder name : ")
self.type = input("Ente the type of account [C/S] : ")
self.deposit = int(input("Enter The Initial amount(>=500 for Saving and >=1000 for
current"))
#self.password=input("Enter your password: ")
print("\n\n\nAccount Created")

def showAccount(self):
print("Account Number : ",self.accNo)
print("Account Holder Name : ", self.name)
print("Type of Account",self.type)

16
print("Balance : ",self.deposit)

def modifyAccount(self):
print("Account Number : ",self.accNo)
self.name = input("Modify Account Holder Name :")
self.type = input("Modify type of Account :")
self.deposit = int(input("Modify Balance :"))

def depositAmount(self,amount):
self.deposit += amount
print("Amount deposit successfully")

def withdrawAmount(self,amount):
self.deposit -= amount
print("Amount withdraw successfully")

def report(self):
print(self.accNo, " ",self.name ," ",self.type," ", self.deposit)

def getAccountNo(self):
return self.accNo
def getAcccountHolderName(self):
return self.name
def getAccountType(self):
return self.type
def getDeposit(self):
return self.deposit

class User:

17
def __init__(self, username, password):
self.username = username
self.password = password

def intro():
print("\t\t\t\t**************************")
print("\t\t\t\tBANK MANAGEMENT SYSTEM")
print("\t\t\t\t********KVSDDN***********")

def save_users(users):
with open("users.data", "wb") as user_file:
pickle.dump(users, user_file)

def load_users():
if os.path.exists("users.data"):
with open("users.data", "rb") as user_file:
return pickle.load(user_file)
else:
return []

def register():
username = input("Enter a new username: ")
password = input("Enter a password: ")

users = load_users()
users.append(User(username, password))
save_users(users)

18
def login():
global num
username = input("Enter your username: ")
password = input("Enter your password: ")
num = int(input("Enter The account No. : "))

users = load_users()
for user in users:
if user.username == username and user.password == password:
print("Login successful!")
return True

print("Invalid username or password. Login failed.")


return False

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()

if not mylist:

19
print("No records to display")
return

print("{0:15}{1:15}{2:15}{3:15}".format("Account No", "Account Holder", "Type",


"Balance"))
print("="*60)

for item in mylist:


print("{0:15}{1:15}{2:15}{3:15}".format(item.accNo, item.name, item.type,
item.deposit))

else:
print("No records to display")

def displaySp(num):
file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
mylist = pickle.load(infile)
infile.close()
found = False
for item in mylist :
if item.accNo == num :
print("Your account Balance is = ",item.deposit)
found = True
else :
print("No records to Search")
if not found :
print("No existing record with this number")

20
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 :
amount = int(input("Enter the amount to deposit : "))
item.deposit += amount
print("Your account is updated successfully")
print("Your accounts balance is =", item.deposit)
elif num2 == 2 :
amount = int(input("Enter the amount to withdraw : "))
if amount <= item.deposit :
item.deposit -=amount
print("Your accounts balance is =", item.deposit)
else :
print("You cannot withdraw larger amount")

else :
print("No records to Search")
outfile = open('newaccounts.data','wb')
pickle.dump(mylist, outfile)
outfile.close()
os.rename('newaccounts.data', 'accounts.data')

21
def deleteAccount(num):
file = pathlib.Path("accounts.data")
if file.exists ():
infile = open('accounts.data','rb')
oldlist = pickle.load(infile)
infile.close()
newlist = []
for item in oldlist :
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')
for item in oldlist :
if item.accNo == num :
item.name = input("Enter the account holder name : ")
item.type = input("Enter the account Type : ")

22
item.deposit = int(input("Enter the Amount : "))

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)
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')

# start of the program


ch=''
num=0

23
intro()
print( " WELCOME!! ")
while ch != 8:
#system("cls");

print("\tMAIN MENU")
print("\t1. NEW ACCOUNT")
print("\t2. DEPOSIT AMOUNT")
print("\t3. WITHDRAW AMOUNT")
print("\t4. BALANCE ENQUIRY")
print("\t5. ALL ACCOUNT HOLDER LIST")
print("\t6. CLOSE AN ACCOUNT")
print("\t7. MODIFY AN ACCOUNT")
print("\t8. EXIT")
print("\tSelect Your Option (1-8) ")
ch = input()
#system("cls");

if ch == '1':
register()
writeAccount()
elif ch =='2':

depositAndWithdraw(num, 1)
elif ch == '3':
if login():
depositAndWithdraw(num, 2)
elif ch == '4':

24
if login():
displaySp(num)
elif ch == '5':
displayAll();
elif ch == '6':
if login():
deleteAccount(num)
elif ch == '7':
if login():
modifyAccount(num)
elif ch == '8':
print("\tThanks for using bank managemnt system")
break
else :
print("Invalid choice")

ch = input("Press any key to continue!!!")


os.system('cls' if os.name == 'nt' else 'clear')

25
OUTPUTS
MAIN MENU

NEW ACCOUNT

DEPOSIT AMOUNT

26
WITHDRAW AMOUNT

27
BALANCE ENQUIRY

ALL ACCOUNT HOLDERS LIST

28
ACCOUNT CLOSING

MODIFY ACCOUNT

29
EXIT MENU

30
LIMITATIONS & FUTURE
ENHANCEMENTS

We have tried our best to do this program but


we have found some Drawbacks in the
program.
The following are the Limitations:
Many features of the account related
functions have to be added. It will increase
usability of the software. Security related
aspects should be resolved accurately.
Money conversion features may be added
to get credit and debit from any place of the
world.
Future enhancement:
As the limitations say future enhancement
will be based on storing multiple account
details of the customers.
Better look and feel features.
Removing data related issues.
This can perform online tasks.
31
BIBLIOGRAPHY

1. www. python.org
2. www.mysql.com
3. www.google.com
4. Computer Science with Python by
Preeti Arora.
5. Computer Science with Python by
Sumita Arora.

32

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy