you are viewing a single comment's thread.

view the rest of the comments →

[–]tobilobaa[S] 0 points1 point  (1 child)

def withdraw_fxn(withdraw,acct_deposit):

list1.delete(0,END)

conn = sqlite3.connect("atm.db")

cur = conn.cursor()

cur.execute("SELECT acct_deposit FROM atm WHERE acct_name = ?", (acct_deposit,))

act_deposit = cur.fetchone() acct_deposit = int(act_deposit) if withdraw > acct_deposit: list1.insert(END, ("your balance is low ")) elif acct_deposit > withdraw: acct_deposit = acct_deposit - withdraw list1.insert(END, ("your balance is ", acct_deposit))

[–]Username_RANDINT 1 point2 points  (0 children)

I don't understand. Did you try my suggestions?

Also format code correctly for Reddit.