CS Project
CS Project
conn=sql.connect(host='localhost',user='root',password='Tarun2820',database='ATM_PROJ')
c1=conn.cursor()
print("================================================================================
")
print("================================================================================
")
print("2.To login")
print("3.Exit")
print("================================================================================
")
print("================================================================================
")
if op==1:
c="y"
while c=="y":
c1.execute(cb)
d=c1.fetchall()
data=c1.rowcount
if data==1:
print("================================================================================
")
print("================================================================================
")
if c=="y":
continue
else:
print("Thank you.")
print("Visit again")
print("================================================================================
")
else:
print("================================================================================
")
c1.execute(ab)
conn.commit()
print("Account sucessfully created")
print("================================================================================
")
print("================================================================================
")
c1.execute(sr)
conn.commit()
c1.execute(ef)
conn.commit()
print("sucessfully deposited")
print("Thank you")
print("Visit again")
break
if op==2:
y="y"
while y=="y":
c1.execute(cb)
c1.fetchall()
data=c1.rowcount
if data==1:
print("================================================================================
")
c1.execute(e)
a=c1.fetchone()
d=list(a)
if pas==d[0]:
print("correct")
print("1.Depositng money")
print("2.withdrawing money")
print("3.Transfering money")
print("4.Checking balance")
print("================================================================================
")
print("================================================================================
")
if r==1:
print("================================================================================
")
sr="update logs set CR_AMT=CR_AMT + {} where ACCOUNT_NO={}".format(amt,acct)
c1.execute(sr)
conn.commit()
c1.execute(ef)
conn.commit()
print("sucessfully deposited")
print("================================================================================
")
if t=="y":
continue
else:
print("Thank you")
if r==2:
print("================================================================================
")
c1.execute(ah)
m=c1.fetchone()
if amt==m[0]:
else:
c1.execute(ed)
c1.execute(sr)
conn.commit()
print("Sucessfully updated")
if t=="y":
continue
else:
print("Thank you")
if r==3:
print("================================================================================
")
c1.execute(cb)
c1.fetchall()
data=c1.rowcount
if data==1:
print("================================================================================
")
c1.execute(ah)
c=c1.fetchone()
if m == c[0]:
print("================================================================================
")
else:
c1.execute(av)
c1.execute(cv)
c1.execute(w)
c1.execute(t)
conn.commit()
print("Sucessfully transfered")
continue
else:
print("Thank you")
if r==4:
c1.execute(ma)
k=c1.fetchone()
print("================================================================================
")
if t=="y":
continue
else:
print("Thank you")
if r==5:
c1.execute(cb)
c1.fetchall()
data=c1.rowcount
if data==1:
print("Try again")
continue
else:
print("Thank you")
else:
c1.execute(ar)
conn.commit()
else:
print("Wrong password")
print("================================================================================
")
else:
if op==3:
print("Exiting")
c1.close()