0% found this document useful (0 votes)
20 views

source code

cxdws

Uploaded by

sunnykumar67ew
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

source code

cxdws

Uploaded by

sunnykumar67ew
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 56

S0urce code

import random
import pymysql
con=pymysql.connect(host='localhost',
user='root',password='sunil',databse='s
k')
cursor=con.cursor()
ctr=0
bank=1
while bank==1:

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>')
print("WELCOME TO BANK OF
GRINGOTTS ONLINE PORTAL")

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>')
print('press 1 for online Banking')
print('press 2 for Registering a (New
Bank Account')
print('press 3 for cancel your Bank
Account')
print('press 4 for Account Holder Help
Services')
print('press 5 for Exit')

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>')
choice=int(input("option:"))

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>')
if choice==1:
def Welcome_message():

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>')
print('WELCOME TO BANK OF
GRINGOTTS')

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>')
def login():
while True:
us=int("enter your usernames:")
p=input("enter your password:")

print('>>>>>>>>>>>>>>>>>>>>
>>>>>')
value(us,p)
query="""select*from accounts
where username=s and passwlord=
%s"""
cursor.execute(query,value)
data_login=cursor,fetchall()
if len(data_login)!=0:
globals()['ctr']
break
else:
print('login unsuccessful')
print('user name or password
is strong is wronh')

print('====================
========')
return data_login
def interface():
welcome_message()
b=login()
if global()['ctr']==1:
i=b[0][0]
name[0][2]
print("login successfully")
print('====================
============')
c=1
while c==1
print('press 1 for Depositing
money')
print('press 2 for withdrawing
money')
print('press 3 for applying KYC')
print('enter 4 for loan request')
print('enter 5 for insurence claim')
print('enter 6 for view full account
details')
print('press 7 for checking
balance')
print('press 8 for logging out')

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>')
ch=int(input("enter your
option:-"))
money_deposit=int(input('amount
to be deposited:'))

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>')
cursor.execute('update account
set balance=balance+%s'id=%s,
(money_deposit,))
con.commit()
q='select balance from accounts
where id=%s and username=%s'
cursor.excute(q,(i,name))
a=a[0]
for x in a:
print("updated balance,"x)

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>')
ELIF ch==2:
money_withdrawn=int(input('Amount to
be withdrawn:-'))

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>')
cursor.excute('update account set
balnce=balce-%s where id=%s',
(money_withdrawn,i))
con.commit()
a=cursor.fetchall()
a=a[0]
for x in a:
print("updated balance:,"x)

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>')
elif==3:
q='select kyc from accounts
where id=%s amd username=s')
cursor.excute(q,(i,name))
a=cursor.fetchall()
a=a[0]
for x in a:
condition=x
if condition='false':
print('for kyc you need to
provide details from one of these
govenment 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:-"))

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>')
if cho==1:
ad=int(input("Aadhar
Number:"))
cursor.excute('update account
set
kyc="true",govid="aadhar_card",idno=
%s where id=%s and username=%s',
(ad.i,name))
con.commit()
print("KYC Done")
elif cho==2:
vi-int(input("Voter Id
Number:"))
cursor.excute('update account
set kyc="true",govid="voter_id",idno=
%s and username=% s',(vi,i,name))
con.commit()
print("kyc done")
elif cho==3:
pc=int(input("pan card
number:"))
cursor.excute('update accounts
set kyc="true",govid="pan_card",idno=
%s where id=%s and username=%s',
(pc,i,name))
con.commit()
print("KYC Done")
else:
print('wrong choice')
else:
print('KYC Already Done')
print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>')
elif ch==4:
q='select loan from accounts where
id=% and username=
%s'cursor.excute(q,(i,name))
a=cursor.fetchall()
a=a[0]
for x in a:
condition=x
if conditin=='false':
print('press 1 for Houshing Loan')
print('press 2 for Personal Loan')
print('press 3 for Educational
Loan')
print('press 4 for Agricultural
Loan')
print('press 5 for Vehicle Loan')
print('press 6 for Gold Loan')

print('====================
===============')
Cho=int(input("Enter your
choice:-"))

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>')
if cho==1:
lo=int(input("Enter Amount of
Houshing Loan Required:"))
loi=int(input("Enter Income
Cerificate Number:"))
sec=input("Enter Land
Document(Security)Number:"))
yr=int(input("Enter no.of Years
you are taking loan for:"))

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>')

emi=((lo*0.00583)*(((1.00583)**(yr))))/(
((1.00583)**(yr*12))-1)
print("Bank of Gringotts
charges an Interest of 7% on Loans")
print("Your requesed loan
amount has to be repaid monthly"))
if loa=='y':
cursor.excute('update
accounts set
loan="true",loan_type="housing",loan_a
mount=
%s,loan_to_be_paid_per_month=
%s,loan_duration=
%s,income_cert_number=
%s,loan_security="landdocument",loan_
security_number=%s where id=%s
where id=%s and username=%s',
(lo,emi,yr,loi,sec,i,name)))
con.commit()
print("Loan Application
Approved")

print('====================
==================')

print('====================
==================')
elif loa=='n':
print("Loan Application
Process Aborted")

print('====================
===================')
else:
print("Wrong Choice")
elif cho==2:
lo=int(input("Enter
Amount of Personal Laon Required:"))
loi=input("Enter Income
Certificate Number:")
secu=input("Enter Which
Document is been given to the bank:")
sec=input("Enter
Document(Security)Number:")
yr=int(input("Enter no.of
Years you are taking loan for:"))

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>')

emi=((lo*0.00583)*(((1.00583)**(yr*12)
)))/(((1.00583)**(yr*12))-1)
print("Bank of Gringotts
charges an Interest of 7% on loans")
print("Your Requested
loan Amount has to be repaid monthly")
print("Amount to repay
the loan per month:%s",emi)
loa=input("Do you want
to Conti the loan application?(y/n):”)

print('====================
======================') if
loa=='y':
cursor.excute('upadte
accounts set
loan="true",loan_type="personal
loan_amount=
%s,loan_to_be_paid_per_month=
%s,loan_duration=
%s,income_cert_number=
%s,loan_security=
%s,loan_security_number=%s where
id=%s and username=
%s'(lo,emi,yr,loi,secu,sec,i,name))
con.commit()

print('====================
======================')
print("Loan Application
Approved")
print('====================
=======================')
elif loa=='n':
print("Loan Applicatin
PROCESS Aborted")

print('====================
=======================')
else:
print("Wrong choice")
elif cho==3:
lo=int(input("Enter
Amount of Educational Loan Required:"))
loi=input("Enter School
Graduatin Cetificate Number:")
secu=input("Enter
which Document is been given to the
Bank:")
sec=input("Enter
Document(security)Number:")
yr=int(input("Enter no.
of Years you are taking loan for:"))
print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>
>>')

emi=((lo*0.00583)*(((1.00583)**(yr*12)
))/(((1.00583)**(yr*12))-1)
print("Bank of
Gringotts charges an Interest of 7% on
loans"))
print("Your Requested
loan amount has to be repaid monthly")
print("Amount to repay
the loan per month:%s",emi)
loa=input("Do you want to continue the
loan application?(y/n):")
if loa=='y':

cursor.excute('updated accounts set


loan="true"_cert_number=
%s,loan_security_number=%a where
id=%s and usename=%s',
(lo,emi,yr,loi,secu,sec,i,name))
con.commit()
print('====================
========================
===')
print("Loan
Application Approved")

print('====================
========================
====')
elif loa=='n':
print("Loan
Application process Aborted")

print('====================
========================
====')
else:
print("Wrong
Choice")
elif cho==4:
lo=int(input("Enter
Amount of Agricultural Loan Required:"))
loi=input("Enter
Income Cerificate Number:")
secu=input("Enter
Which Document is been given to the
bank:")
yr=int(input("Enter
no. of Years you are taking loan for:"))

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>')emi=((lo*0.00583)*(((1.00583)
**)(yr*12))))/(((1.00583)**(yr*12))-1)
print("Bank of
Gringotts charges an Interest of 7% on
loans")
print("Your
Requested loan amount has to be repaid
monthly")
print("Amount to repay the loan per
month:%s"s,emi)
loa=input("Do you
Want to continue the loan application?
(y/n):")
if loa=='y':

cursor.excute('update account set


loan="true",loan_type="agricultural",loa
n_amount=
%s,loan_to_be_paid_per_month=
%s,loan_duration=
%s,income_cert_number=%s,loan
security=%s,loan_security_number=%s
where id=%s and username=%s',
(lo,emi,yr,loi,secu,sec,i,name))
con.commit()

print('====================
========================
===')
print("Loan
Application Approved")

print('====================
========================
====')
elif loa=='n':
print("Loan
Application process Aborted")

print('====================
========================
====')
else:
print("Wrong
Choice")
elif cho==5:
lo=int(input("Enter Amount of vehicle
Loan Required:"))
loi=input("Enter
Income Cerificate Number:")
yr=int(input("Enter
no. of Years you are taking loan for:"))

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>')
emi=((lo*0.00583)*(((1.00583)**)
(yr*12))))/(((1.00583)**(yr*12))-1)
print("Bank of
Gringotts charges an Interest of 7% on
loans")
print("Your
Requested loan amount has to be repaid
monthly")
print("Amount to
repay the loan per month:%s"s,emi)
loa=input("Do you
Want to continue the loan application?
(y/n):")
if loa=='y':

cursor.excute('update account set


loan="true",loan_type="vehicle",loan_a
mount=
%s,loan_to_be_paid_per_month=
%s,loan_duration=
%s,income_cert_number=%s,loan
security=null,loan_security_number=nul
l where id=%s and username=%s',
(lo,emi,yr,loi,secu,sec,i,name))
con.commit()

print('====================
========================
===')
print("Loan
Application Approved")

print('====================
========================
====')
elif loa=='n':
print("Loan
Application process Aborted")

print('====================
========================
====')
else:
print("Wrong
Choice")
elif cho==6:
lo=int(input("Enter
Amount of Gold Loan Required:"))
loi=input("Enter
Income Certificate Number:")
go=input("Enter the
Type of Gold jewel Given at the Bank:"))
sec=input("Enter the
amount of Gold given to the Bank(in
grams):")
yr=int(input("Enter
no. of Years you are taking loan for:"))

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>')
emi=((lo*0.00583)*(((1.00583)**)
(yr*12))))/(((1.00583)**(yr*12))-1)

print("Bank of
Gringotts charges an Interest of 7% on
loans")
print("Your
Requested loan amount has to be repaid
monthly")
print("Amount to
repay the loan per month:%s"s,emi)
loa=input("Do you
Want to continue the loan application?
(y/n):")
if loa=='y':

cursor.excute('update account set


loan="true",loan_type="gold",loan_amo
unt=%s,loan_to_be_paid_per_month=
%s,loan_duration=
%s,income_cert_number=%s,loan
security=null,loan_security_number=nul
l where id=%s and username=%s',
(lo,emi,yr,loi,secu,sec,i,name))
con.commit()

print('====================
========================
===')
print("Loan
Application Approved")

print('====================
========================
====')
elif loa=='n':
print("Loan
Application process Aborted")

print('====================
========================
====')
else:
print("Wrong
Choice")
else:
print("Aleardy loan
Applied!!")

print('====================
========================
====')
elif ch==5:
q='select insurance
from accounts where id=%s and
username=%s'
cursor.excute(q,
(i,name))
a=cursor.fetchall()
a=a[0]
for x in a:
condition=x
if condition=='false':
print('Choose Type of
Insurance')
print('press 1 for
Vehicle Insurance')
print('press 2 for Life
Insurance')
print('press 3 for
Property Insurance')
print('press 4 for
Business Insurance')
print('====================
========================
======')
cho=int(input("Enter
your choice:-"))

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>
>
if cho==1:
ve=input("Enter
Vehicle Manufacturer:")
ty=input("Enter
Vehicle Type:")
y=int(input("Enter
Year of Manufacture:"))
fu=input("Enter
Fuel Used:")

r=input(input("Enter Registration
State:"))
rn=input("Enter
Vehicle Registration Number:")
if ty=='car':

ins=int(input("Enter Claim Amount for


Car to be Insured:"))

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>')
ina=((ins/5)/12)-(ins/150)
print("Bank of
Gringotts gives Insurance for cars
of:",ins)
print("Your
Requested Insurance Claim Amount to
be paid yearly")
print("Amount
to pay the Insurance Claim Amount per
year:",ina)
ioa=input("Do
you Pay the for Insurance Claim
application?(y/n):")
if loa=='y':

cursor,excute('update account set


insurance="true",insurance_type="vehi
cle_manufacturer=%s,vehicle_model=
%s,vehicle_year=%s,vehicle_fuel=
%s,vehicle_reg_state=
%s,vehicle_reg_no=
%s,insurance_amount=
%s,insurance_to_be_paid_per_year=%s
where id=%s and username=%s',
(ve,ty,y,fu,r,rn,ins,ina,i,name))
con.commit()

print('====================
========================
==========')

print("Insurance Claim Taken")

print('====================
========================
==========')
else:

print("Insurance Claim Aborted")

print('====================
========================
===========')
elif ty='bike':

ins=int(input("Enter Claim Amount for


Bike to be Insured:"))

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>')

ina=((ins/5)/15)
print("Bank
of Gringotts gives Insurance for bikes
of:",ins)
print("Your
Requested Insurance Claim Amount has
to be paid yearly")

print("Amount to pay the Insurance


Claim Amount per year:",ina)
ioa=input("Do
you Pay the for Insurance Claim
application?(y/n):")
if loa=='y':

cursor,excute('update account set


insurance="true",insurance_type="vehi
cle_manufacturer=%s,vehicle_model=
%s,vehicle_year=%s,vehicle_fuel=
%s,vehicle_reg_state=
%s,vehicle_reg_no=
%s,insurance_amount=
%s,insurance_to_be_paid_per_year=%s
where id=%s and username=%s',
(ve,ty,y,fu,r,rn,ins,ina,i,name))
con.commit()

print('====================
========================
==========')

print("Insurance Claim Taken")

print('====================
========================
==========')
else:
print("Insurance Claim Aborted")

print('====================
========================
===========')
elif ty='bike':

ins=int(input("Enter Claim Amount for


Bike to be Insured:"))

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>')

ina=((inss/5)/15)
print("Bank
of Gringotts gives Insurance for bikes
of:",ins)
print("Your
Requested Insurance Claim Amount has
to be paid yearly")

print("Amount to pay the Insurance


Claim Amount per year:",ina)
ioa=input("Do
you Pay the for Insurance Claim
application?(y/n):")
if loa=='y':

cursor,excute('update account set


insurance="true",insurance_type="vehi
cle_manufacturer=%s,vehicle_model=
%s,vehicle_year=%s,vehicle_fuel=
%s,vehicle_reg_state=
%s,vehicle_reg_no=
%s,insurance_amount=
%s,insurance_to_be_paid_per_year=%s
where id=%s and username=%s',
(ve,ty,y,fu,r,rn,ins,ina,i,name))
con.commit()

print('====================
========================
==========')

print("Insurance Claim Taken")

print('====================
========================
==========')
else:

print("Insurance Claim Aborted")

print('====================
========================
===========')
elif cho==2:

mc=input("Enter Medical Cerificate


Number:")

bc=input("Enter Birth Certificate


Number:")

ins=int(input("Enter Claim Amount to be


Insured:"))

print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>')
ina=(ins/12)-
(ins/20)
print("Bank of
Gringotts gives Life Insurance of:".ins)
print("Your
Requested Insurance Claim Amount to
be paid yearly")
print("Amount
to be pay the for Insurance Claim
Amount per year:",ina)
loa=input("Do
you want to continue the Insurance
Claim application?(y/n):")
if loa=='y':
cursor.excute('update accounts set
insurance="true",insurance_type="life",
medical_cert_no=
%s,insurance_amount=
%s,insurance_to_be_paid_per_year=%s
where id=%s and username=%s',
(mc,bc,ins,ina,i,name))

con.commit()

print('====================
========================
==========')

print("Insurance Claim Taken")

print('====================
========================
==========')
else:

print("Insurance Claim Aborted")

print('====================
========================
===========')
elif cho==3:

dc=input("Enter Property Document


Number:")

fi=input("Enter FIR Number(FOR THIFT


OR LOSS:")

ins=int(input("Enter Claim Amount to be


Insured:"))
print('>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>')
ina=(ins/12)/7
print("Bank of
Gringotts gives property of:,"ins))
print("Your
Requested loan amount has to be repaid
monthly")
print("Amount to pay
the for Insurance Claim Amount per
year:",ina)
loa=input("Do you
Want to continue the loan application?
(y/n):")
if loa=='y':

cursor.excute('update accounts set


insurance="true",insurance_type="
"Property",property_no=%s,fir_no=
%s,insurance_amount=
%s,insurance_to_be_paid_per_year=%s
where id=%s and username=%s',
(dc,fi,ins,i,name))
con.commit()

print('====================
========================
==========')

print("Insurance Claim Taken")

print('====================
========================
==========')
else:
print("Insurance Claim Aborted")

print('====================
========================
===========')

elif cho==4:

em=input("Enter Employment Builiding


Name:")
ca=input("Enter Cause of Claim:")

print("Insurance Claim Aborted")

print('====================
========================
===========')
else:

print("Insurance Already Claimed!!")

print('====================
========================
===========')
elif ch==6:
q='select
insurance from accounts where id=%s
and username=%s'

cursor.excute(q,(i,name))

a=cursor.fetchall()
for x in a:
print("Account Number:",x[0])

print('----------------------------------')

print("Account Holder's Name:':",x[1])

print('----------------------------------')

print("Account Holder's
Username':",x[2])

print('----------------------------------')

print("Account Balance:",x[4])

print('----------------------------------')

print("Account Holder Age:",x[5])

print('----------------------------------')

print("Account Holder's Gender:",x[6])

print('----------------------------------')

print("Account Holder's Number:",x[7])


print('----------------------------------')

print("Account Holder's street


address:",x[8])

print('----------------------------------')

print("Account Holder's district


address:",x[9])

print('----------------------------------')

print("Account Holder's pin code


address:",x[10])

print('----------------------------------')

print("Account Holder's state:",x[11])

print('----------------------------------')

print("Account Holder's country:",x[12])

print('----------------------------------')

print("KYC:",x[13])
print('----------------------------------')

print("Account Holder's Nominee:",[14])

print('----------------------------------')

print("Account Holder's Government id


For KYC:",x[15])

print('----------------------------------')

print("Account Holder's Government id


Number For KYC:",x[16])

print('----------------------------------')

print("LOAN:",x[17])

print('----------------------------------')
if
x[17]=='true':

print("Account Holder's Loan


Type:",x[18])

print('----------------------------------')
print("Account Holder's Loan
Amount:",x[19])

print('----------------------------------')

print("Account Holder's Loan


Duration:",x[21])

print('----------------------------------')

print("Account Holder's Income


Certificate Number:",[22])

print('----------------------------------')

print("Account Holder's Loan


Security:",x[23])

print('----------------------------------')

print("Account Holder's Loan Security


Number/Weight:",x[24])

print('----------------------------------')

print("INSURANCE:",x[25])
print('----------------------------------')
if
x[25]=='true':

print("Account Holder's Insurance


Type:",x[26])

print('----------------------------------')
if
x[26]=='Vehicle':

print("Account Holder's Insurance


Amount:",[27])

print('----------------------------------')

print("Account Holder's Insurance


Amount to be Paid per Year:",x[28])

print('----------------------------------')

print("Account Holder's Insurance


Vehicle Manufacturer:",[29])

print('----------------------------------')
print("Account Holder's Insurance
Vehicle Model:",x[30])

print('----------------------------------')

print("Account Holder's Vehicle Model


Year:",[31])

print('----------------------------------')

print("Account Holder's Insurance


Vehicle Fuel Type:",x[32])

print('----------------------------------')

print("Account Holder's Insurance


Vehicle Registered State:",x[33])

print('----------------------------------')

print("Account Holder's Insurance


Vehicle Registered Number:",x[34])

print('----------------------------------')
elif
x[26]=='life':

print("Account Holder's Insurance


Amount:"x[27])

print('----------------------------------')

print("Account Holder's Insurance


Amount to be paid per Year:",x[28])

print('----------------------------------')

print("Account Holder's Medical


Certificate Number:",x[35])

print('----------------------------------')

print("Account Holder's Birth Certificate


Number:",x[36])

print('----------------------------------')
elif
x[26]=='property':
print("Account Holder's Insurance
Amount:",x[27])

print('----------------------------------')

print("Account Holder's Insurance


Amount to be paid per Year:",x[28])

print('----------------------------------')

print("Account Holder's Insurance


Property Number:",x[37])

print('----------------------------------')

print("Account Holder's FIR


Number(Incase of Theft or Damage to
property):",x[38])

print('----------------------------------')
elif
x[26]=='business':

print("Account Holder's Insurance


Amount:",x[27])
print('----------------------------------')

print("Account Holder's Insurance


Amount to be paid per Year:",x[28])

print('----------------------------------')

print("Account Holder's Insured Building


Name:",x[39])

print('----------------------------------')

print("Account Holder's Insurance


Amount Claiming Cause Medica/Death
Certificate Number:",x[41])

print('----------------------------------')
elif
ch==7:

q='select balance from acconts where


id=%s and usernam%s'

cursor.excute(q,(i,name))
a=cursor.fetchall()

a=a[0]
for
x in a:

print("Balance:-",x)

print('====================
========================
===========')
elif
ch==8:

c=0

else:

print("Wrong Option")

print('====================
========================
===========')

interface()
elif
choice==2:

print('FILL THE DETAILS TO CREATE


YOUR ACCOUNT')

idea=random.randint(1,100)

name=input("Enter your name:")

username=input('Enter your
Username:')

pas=input('Enter your password:')

balance=float(input('Enter your
balance'))

age=int(input('Enter your age:'))

gender=input('Enter your gender(M/F):')

Mob=int(input('Enter Mobile no.:'))

street=input('Enter your street name:')

district=input('Enter your District:')


pincode=int(input('Enter your
pincode:'))

state=input('Enter state')

country=input('Enter state:')
nominee=input("Enter Nominee
Name(Incase after Death the Amount
credentials has to be handed Over):")

print('====================
========================
===========')

kyc='false'

loan='false'

insurance='false'

query='insert into accounts

values(%s,%s,%s,%s,%s,%s,%s,%s,%s,
%s,%s,%s,%s,%s,%s,null,null
%s,null,null,null,null,null,null,null,null,nul
l,null,
%s,null,null,null,null,null,null,null,null,nul
l,null,null,null,null,null,null,null,null,);'

value=(idea,name,username,pas,balanc
e,age,gender,mob,street,district,pincode
,state,country,kyc,nominee,loan,insuran
ce)

cursor.excute(queary,value)
con.commit()

print('====================
========================
===========')

print('Bank Account Successfully


Created')
elif
choice==3:

us=input("Enter your username:-")

p=(input("Enter your Password:-"))


print('====================
========================
===========')

value=(us,p)

queary=select*from account where


username=%s and password=%s"

cursor.excute(queary,value)

data_login=cursor.fetchall()

cursor.excute('delete from accounts


where id=%s and username=%s',
(data_login[0][0],data_login[0][2]))

con.commit()

print('====================
========================
===========')
print('Bank Account Successfully
Closed')
elif
choice==4:

print('TOLL FREE NO-18001234567890')

print('====================
========================
===========')
elif
choice==5:

bank=0
else:

print('Wrong Option')

print('====================
========================
===========')

END OF SOURCE CODE

You might also like