Computer Science Project File Class 12 EXTERNALS
Computer Science Project File Class 12 EXTERNALS
INTRODUCTION
It can add new accounts and edit the existing ones and it also helps in
viewing the details of the customer either by name or by their account
number. It helps in the deposition or withdrawal of money from an account
and also helps in modifying the incorrect data of an account of the customer
and closing an account.Also to create KYC a person need to enter either of
following documents- Voting Id Card, Aadhar Number,Driving License,Pan
Card.
LIBRARIES USED AND
THEIR PURPOSE
1. tabulate–fordisplayingthedetailsinthetabular format
2. MySQL connector–
fordevelopingaconnectionbetween MySQL
databases and Python programminglanguage
CODING
# Project on Bank Management System
print("AccNO : ",myrecord[0])
print("NAME : ",myrecord[1])
print("USERNAME : ",myrecord[2])
print("AccType : ",myrecord[3])
print("Balance : ",myrecord[4])
print("AGE : ",myrecord[5])
print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
print("ENTER THE NEW VALUE FOR CHANGE OR JUST LEAVE AND PRESS ENTER")
x=input("Enter new name or leave")
if len(x)>0:
name=x
y=input("Enter new Account Type or leave ")
if len(y)>0:
typ=y
z=input("Enter new username or leave")
if len(z)>0:
username=z
b=input("Enter new age or leave")
if len(b)>0:
ag=int(b)
query='update ACCOUNT_REGISTRY
setname='+"'"+name+"'"+','+'acctype='+"'"+typ+"'"+','+'username='+"'"+username+"'"+','+'
age='+str(ag)+' where accno=' +no
print(query)
cur.execute(query)
con.commit()
print("details modified")
except Exception as e:
print("error in modifying")
print(e)
elif choice==7:
try:
no=input("Enter Account Number ")
query="select * from ACCOUNT_REGISTRY where accno= "+no
cur.execute(query)
myrecord=cur.fetchone()
c=cur.rowcount
if c==-1:
print("Account Number "+no+" does not exist")
else:
amount=int(input("Enter amount to deposit"))
bal=amount+int(myrecord[4])
query='update ACCOUNT_REGISTRY set balance=%s where '+\
'accno=%s'
rec=(bal,no)
cur.execute(query,rec)
con.commit()
print("Amount Deposited in account no",no)
except:
print("error in Depositing Amount")
elif choice==8:
try:
no=input("Enter Account Number ")
query="select * from ACCOUNT_REGISTRY where accno= "+no
cur.execute(query)
myrecord=cur.fetchone()
c=cur.rowcount
if c==-1:
print("Account Number "+no+" does not exist")
else:
amount=int(input("Enter amount to withdraw"))
if amount<myrecord[4]:
bal=int(myrecord[4])- amount
if bal>1000:
query='update ACCOUNT_REGISTRY set balance=%s where '+\
'accno=%s'
rec=(bal,no)
cur.execute(query,rec)
con.commit()
print("Amount Withdrawn")
else:
print("insufficient balance so cant withdraw ")
else:
print("amount to be withdrawn greater than your balance available")
except:
print("error in Withdrawing Amount")
elif choice==9:
no=input("Enter Your Account Number")
query="select * from ACCOUNT_REGISTRY where accno= "+no
cur.execute(query)
myrecord=cur.fetchone()
c=cur.rowcount
if c==-1:
print("Account Number "+no+" does not exist")
else:
if myrecord[6]=='not done':
print('For KYC you need to provide details from one of these government id')
print('Press 1 for Aadhar Card')
print('Press 2 for Voter Id Card')
print('Press 3 for Pan Card')
print('Press 4 for Driving License')
print('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
cho=int(input("Enter your choice :- "))
if cho==1:
ad=int(input("Aadhar Number :- "))
cur.execute('update ACCOUNT_REGISTRY set kyc='+str(ad)+' where '+\
'accno='+no)
con.commit()
print("KYC Done")
elifcho==2:
vi=int(input("Voter Id Number :- "))
cur.execute('update ACCOUNT_REGISTRY set kyc='+str(vi)+' where '+\
'accno='+no)
con.commit()
print("KYC Done")
elifcho==3:
pc=int(input("Pan Card Number :- "))
cur.execute('update ACCOUNT_REGISTRY set kyc=+'+str(pc)+' where '+\
'accno='+no)
con.commit()
print("KYC Done")
elif ch==4:
dl=int(input("Driving License Number :- "))
cur.execute('update ACCOUNT_REGISTRY set kyc='+str(dl)+' where '+\
'accno='+no)
con.commit()
print("KYC Done")
else:
print('Wrong Choice')
else:
print("kyc already done")
elif choice==0:
break
OUTPUTS
1. INITIALSCREEN
2. D
A
T
A
B
A
S
E
AND TABLECREATION
3. ADDRECORD
4. SEARCHRECORD
5. DISPLAY ALLRECORD
6. MODIFY RECORD
7. DELETERECORD
8. DEPOSIT MONEY
9. WI
TH
DR
A
W
MONEY
10. ADD KYC