A simple ATM controller
-
database(): If there is no database, create a new database.
-
search_account(card, account): Enter card/account num and search the database. Return result or -1.
-
check_pin(card, pin): Enter card/pin num and verify that it matches the database.
-
withdraw_deposit(str1, card, account, pin, amount): Used for deposit and withdrawal.
str1: "deposit" or "withdraw" card: card number account: account number pin: pin number amount: deposit/withdraw balance amount -
account_balance(card, pin): Check your multi-account balance in the database with card/pin number.
-
if name == "main": Function tester. You can test all functions with this.
- There is "bankdata.db" for test.