0% found this document useful (0 votes)
31 views15 pages

Bank Management System

The document describes a computer science project on a bank management system created by Ayush Patel. It includes explanations of the system's functions like creating accounts, depositing and withdrawing money, and displaying account details. The system uses Python coding and a MySQL database to store account and transaction information in two tables. It allows users to perform basic banking tasks like deposits, withdrawals, and checking balances through an interactive menu-driven interface.

Uploaded by

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

Bank Management System

The document describes a computer science project on a bank management system created by Ayush Patel. It includes explanations of the system's functions like creating accounts, depositing and withdrawing money, and displaying account details. The system uses Python coding and a MySQL database to store account and transaction information in two tables. It allows users to perform basic banking tasks like deposits, withdrawals, and checking balances through an interactive menu-driven interface.

Uploaded by

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

COMPUTER SCIENCE PROJECT

FIRDAUS AMRUT CENTRE SCHOOL


AHEMDABAD CANTT.

SESSION: 2023-2024
COMPUTER SCIENCE INVESTIGATORY PROJECT
BANK MANAGEMENT SYSTEM

SUBMITTED TO :- SUBMITTED BY:-


MR. JITENDRA SAWANT AYUSH PATEL
ROLL NO-01
CLASS-XII-“A”

pg. 1
COMPUTER SCIENCE PROJECT

pg. 2
COMPUTER SCIENCE PROJECT

CERTIFICAT
E
THIS IS TO CERTIFY THAT THE PROJECT
WORK ENTITLED “BANK MANAGEMENT
SYSTEM” IS BEING CARRIED OUT AND
SUBMITTED BY “AYUSH PATEL” OF CLASS
XII-B DURING THE ACADEMIC YEAR 2023-
2024.

INTERNAL EXAMINER’S SIGN

EXTERNALEXAMINER SIGN
pg. 3
COMPUTER SCIENCE PROJECT

ACKNOWLEDGEME
NT

I WOULD LIKE TO EXPRESS MY


SPECIAL THANK TO MY
COMPUTER SCIENCE TEACHER “MR.
JITENDRA SAWANT” AS WELL AS OUR
SCHOOL PRINCIPAL “MRS.KIRTI
SHARMA” WHO GAVE THE
OPPORTUNITY TO DO THIS
WONDERFUL PROJECT ON THE TOPIC
“BANK MANAGEMENT SYSTEM”
WHICH ALSO HELPED ME IN DOING A
LOT OF RESEARCH WORK AND I CAME

pg. 4
COMPUTER SCIENCE PROJECT

UP TO KNOW ABOUT SO MANY


THINGS. I AM REALLY THANKFUL TO
THEM.

pg. 5
COMPUTER SCIENCE PROJECT

TABLE OF
CONTENTS
 EXPLANATION

 WORKING

 CODING

 OUTPUT

 BIBLIOGRAPHY

pg. 6
COMPUTER SCIENCE PROJECT

EXPLANATION

This is a Python code for a basic bank transaction


system. It uses a MySQL database to store account
and transaction details.
The code creates a “bank” database if it does not
already exist and then creates two tables in the
database- “bank_master” and “banktrans”. The
“bank_master” table stores details of each account
holder, such an account number, name, city, mobile
number, and account balance. The “banktrans” table
stores transaction details, such as account number,
amount, date of transaction, and transaction type
(deposit or withdrawal)
The code then presents a menu to the user with the
following options:
1. Create account
2. Deposit money
3. Withdraw money
4. Display account

pg. 7
COMPUTER SCIENCE PROJECT

5. Exit
If the user chooses to create an account, the code
prompts for details such as account number, name,
city and mobile number. It then inserts the details into
the “bank_master” table and sets the account balance
to 0.
If the user chooses to deposit money, the code
prompts for the account number and amount to be
deposited. It then inserts a transaction record into the
“banktrans” table with the account number, amount,
current date, and transaction type “d”. It also updates
the account balance in the “bank_master” table.
If the user chooses to withdraw money, the code
prompts for the account number and amount to be
withdrawn. It then inserts a transaction record into
the “banktrans” table with the account number,
account, current date, and transaction type “w”. It
also updates the account balance in the
“bank_master” table.
If the user chooses to display an account, the code
prompts for the account number and then retrieves
and displays the account details from the
“bank_master” table.
If the user chooses to exit, the code breaks out of the
while loop and ends.

pg. 8
COMPUTER SCIENCE PROJECT

WORKING
This program consists of five options as
follows:

1. To add a new account


2. To deposit amount
3. To withdraw amount
4. To enquire the balance amount
5. To view all account holder list
6. To close an account
7. To modify an account
8. To exit

pg. 9
COMPUTER SCIENCE PROJECT

CODE

print("****BANK TRANSACTION****")
#creating database
import mysql.connector
mydb=mysql.connector.connect
(host="localhost",user="root", passwd="admin")
mycursor=mydb.cursor()
mycursor.execute("create database if not exists
bank")
mycursor.execute("use bank")
#creating required tables
mycursor.execute("create table if not exists
bank_master(acno char(4) primary key,name
varchar(30),city char(20),mobileno
char(10),balance int(6))")
mycursor.execute("create table if not exists
banktrans(acno char (4),amount int(6),dot
date,ttype char(1),foreign key (acno) references
bank_master(acno))")
mydb.commit()
while(True):

print("1=Create account")
print("2=Deposit money")
print("3=Withdraw money")
print("4=Display account")
print("5=Exit")
ch=int(input("Enter your choice:"))

#PROCEDURE FOR CREATING A NEW ACCOUNT OF THE


APPLICANT
if(ch==1):

pg. 10
COMPUTER SCIENCE PROJECT

print("All information prompted are


mandatory to be filled")
acno=str(input("Enter account number:"))
name=input("Enter name(limit 35
characters):")
city=str(input("Enter city name:"))
mn=str(input("Enter mobile no.:"))
balance=0
mycursor.execute("insert into bank_master
values('"+acno+"','"+name+"','"+city+"','"+mn+"','
"+str(balance)+"')")
mydb.commit()
print("Account is successfully
created!!!")

#PROCEDURE FOR UPDATIONG DETAILS AFTER THE


DEPOSITION OF MONEY BY THE APPLICANT
elif(ch==2):
acno=str(input("Enter account number:"))
dp=int(input("Enter amount to be
deposited:"))
dot=str(input("Enter date of Transaction:
YYYY-MM-DD "))
ttype="d"
mycursor.execute("insert into banktrans
values('"+acno+"','"+str(dp)
+"','"+dot+"','"+ttype+"')")
mycursor.execute("update bank_master set
balance=balance+'"+str(dp)+"' where
acno='"+acno+"'")
mydb.commit()
print("money has been deposited
successully!!!")
#PROCEDURE FOR UPDATING THE DETAILS OF ACCOUNT
AFTER THE WITHDRAWL OF MONEY BY THE APPLICANT

elif(ch==3):
acno=str(input("Enter account number:"))
wd=int(input("Enter amount to be
withdrawn:"))

pg. 11
COMPUTER SCIENCE PROJECT

dot=str(input("enter date of transaction:


YYYY-MM-DD "))
ttype="w"
mycursor.execute("insert into banktrans
values('"+acno+"','"+str(wd)
+"','"+dot+"','"+ttype+"')")
mycursor.execute("update bank_master set
balance=balance-'"+str(wd)+"' where
acno='"+acno+"'")
mydb.commit()

#PROCEDURE FOR DISPLAYING THE ACCOUNT OF THE


ACCOUNT HOLDER AFTER HE/SHE ENTERS HIS/HER ACCOUNT
NUMBER
elif(ch==4):
acno=str(input("Enter account number:"))
mycursor.execute("select * from
bank_master where acno='"+acno+"'")
for i in mycursor:
print(i)
else:
break

pg. 12
COMPUTER SCIENCE PROJECT

OUTPUT
****BANK TRANSCITION****
1=Create account
2=Deposit money
3=Withdraw money
4=Display account
5=Exit
Enter your choice:1
All information prompted are mandatory to be
filled
Enter account number:1001
Enter name(limit 35 characters): ”Jitendra Singh”
Enter city name:”New Delhi ”
Enter mobile no. : 1234567890
Account is successfully created!!!

Enter your choice:2


Enter account number:1001
Enter amount to be deposited:5000

pg. 13
COMPUTER SCIENCE PROJECT

Enter date of Transaction: YYYY-MM-DD 2021-10-10


money has been deposited successfully!!!

Enter your choice:3


Enter account number:1001
Enter amount to be withdrawn:1000
enter date of transaction: YYYY-MM-DD 2021-10-11

Enter your choice:4


Enter account number:1001
(‘1001’, ‘”Jitendra Singh”’, ‘”New Delhi”’,
‘1234567890’, 4000)
1-Create account
2-Deposit money
3-Withdraw money
4-Display account
5-Exit

pg. 14
COMPUTER SCIENCE PROJECT

BIBLIOGRAPHY

 www.google.com
 www.wikipedia.com
 Computer science with python by
Sumita Arora

pg. 15

You might also like