You are on page 1of 13

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

CERTIFICATE

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

ACKNOWLEDGEMENT

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 UP TO KNOW ABOUT SO MANY THINGS. I AM
REALLY THANKFUL TO THEM.

pg. 4
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 transac�on


system. It uses a MySQL database to store account
and transac�on 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 transac�on details, such as account number,
amount, date of transac�on, and transac�on type
(deposit or withdrawal)
The code then presents a menu to the user with the
following op�ons:
1. Create account
2. Deposit money
3. Withdraw money
4. Display account
5. Exit

pg. 7
COMPUTER SCIENCE PROJECT

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 transac�on record into the
“banktrans” table with the account number, amount,
current date, and transac�on 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 transac�on record into
the “banktrans” table with the account number,
account, current date, and transac�on 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 displayes 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 op�ons 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

pg. 10
COMPUTER SCIENCE PROJECT

if(ch==1):
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 informa�on 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 Transac�on: 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 transac�on: 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