0% found this document useful (0 votes)
8 views18 pages

Bank Management System

computer science project

Uploaded by

aman gamer
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)
8 views18 pages

Bank Management System

computer science project

Uploaded by

aman gamer
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/ 18

BANK MANAGEMENT SYSTEM

Submitted as a part if C.B.S.E Curriculum for the


year 2024-25

Submitted to : Submitted by:


Sarabjeet Kaur Prince
Amandeep Singh
CONTENTS …
 CERTIFICATE

 ACKNOLEDGEMENT

 PROJECT PREAMBLE

 PROCESS

 SOURCE CODE

 OUTPUT
CERTIFICATE

This is to certify that Prince, Amandeep singh class 12 A


worked on the project
“BANK MANAGEMENT SYSTEM” and completed the
project towards our statisfaction .

Student’s signature Teacher’s signature

Principal’s signature
ACKNOWLEDGEMENT

It gives me immense pleasure in expressing my deep


sense of gratitude to my respected teacher , Mrs
Sarabjeet Kaur for her inspiring guidance and thought
in the preparation of the project .This project would not
been completed without her valuable guidance and her
tremendous effort .
SOURCE CODE
print("______________________________________
______")
print("\t Bank Management System")
print("______________________________________
__________")
import mysql.connector
mydb=mysql.connector.connect(host="localhost",us
er="root",passwd="root")
mycursor=mydb.cursor()
mycursor.execute("create database Bank2")
mycursor.execute("use Bank2")
mycursor.execute("create table if not exists
login(admin varchar(25)not null,password
varchar(25)not null)")
mycursor.execute("create table if not exists
bank_master(acc_no int not null,name
varchar(25)not null,city varchar(25)not null,piin int
not null,balance int not null)")
mycursor.execute("create table if not exists sno(no
int not null,temp intnot null)")
mydb.commit()
j=0
mycursor.execute("select * from login")
for i in mycursor:
j=1
if(j==0):
mycursor.execute("insert into login
values('admin','ng')")
mydb.commit()
z=0
mycursor.execute("select*from sno")
for i in mycursor:
z=1
if(z==0):
mycursor.execute("insert into sno values(0,0)")
mydb.commit()
while True:
print("1.login")
print("2.exit")
ch=int(input("enter your choice:"))
if(ch==1):
password=input("enter password:")
mycursor.execute("select*from login")
for i in mycursor:
admin,passs=i
if(password==passs):
print("successfully login.....")
print("1.create account")
print("2.deposit money")
print("3.withdraw money")
print("4.Display")
print("5.Exit")
ch2=int(input("enter your choice"))
balance=0
if (ch2==1):
name=input("enter the name")
city=input("enter city")
pin=int(input("enter PIN"))

mycursor.execute("select * from sno")


for i in mycursor:
no,temp=i
no+=1
mycursor.execute("insert into bank_master
values('"+str(no)+"','"+name+"','"+city+"','"+str(pin)
+"','"+str(balance)+"')")
mydb.commit()
print("successfully done.....")

######### Deposit ########


elif(ch2==2):
account=int(input("enter account
number:"))
amount=int(input("enter the amount"))
mycursor.execute("select*from
bank_master where acc_no='"+str(account)+"'")
for i in mycursor:
acc,name,city,pin,balance=i
balance=balance+amount
mycursor.execute("update bank_master set
balance='"+str(balance)+"'where
acc_no='"+str(account)+"'")
mydb.commit()
print("successfully deposit......")

######### Withdraw #######


elif(ch2==3):
account=int(input("enter account
number:"))
amount=int(input("enter the amount"))
mycursor.execute("select*from
bank_master where acc_no='"+str(account)+"'")
for i in mycursor:
acc,name,city,pin,balance=i
balance=balance-amount
if(balance<0):
print("not having sufficient amount")
continue
mycursor.execute("update
bank_master set balance='"+str(balance)+"'where
acc_no='"+str(account)+"'")
mydb.commit()
print("successfully withdraws......")
######### Display ########
elif(ch2==4):
account=int(input("enter your acc no "))
mycursor.execute("select*from
bank_master where acc_no='"+str(account)+"'")
for i in mycursor:
acc,name,city,pin,balance=i
print(f"Account--->{acc}")
print(f"Name--->{name}")
print(f"City--->{city}")
print(f"balance--->{balance}")

else:
print("wrong password .....")
Outputs
___________________________________________
Bank Management System
___________________________________________
1.login
2.exit
enter your choice:1
enter password:ng
successfully login.....
1.create account
2.deposit money
3.withdraw money
4.Display
5.Exit
enter your choice:1
enter the name:jatin
enter city:chandigarh
enter PIN:12345
successfully done.....
1.login
2.exit
enter your choice:1
enter password:ng
successfully login.....
1.create account
2.deposit money
3.withdraw money
4.Display
5.Exit
enter your choice2
enter account number:1
enter the amount:76
successfully deposit......
1.login
2.exit
enter your choice:1
enter password:ng
successfully login.....
1.create account
2.deposit money
3.withdraw money
4.Display
5.Exit
enter your choice3
enter account number:1
enter the amount26
successfully withdraws......
1.login
2.exit
enter your choice:1
enter password:ng
successfully login.....
1.create account
2.deposit money
3.withdraw money
4.Display
5.Exit
enter your choice4
enter your acc no: 1
Account--->1
Name--->jatin
City--->chandigarh
balance--->50
1.login
2.exit
enter your choice:1
enter password:ng
successfully login.....
1.create account
2.deposit money
3.withdraw money
4.Display
5.Exit
enter your choice5
>>>
PROJECT PREAMBLE

The project titled “BANK MANAGEMENT SYSTEM”has


been developed as per the requirement of CBSE for
subject computer science year 2023-2024,The source
code has been developed in python .

The project deals with creation of records, inserting


data,reading&printing of stored records .

You might also like