From 390b70d562bfa6f47e9c0ce2077ae705247a2eed Mon Sep 17 00:00:00 2001 From: Matt Theissen Date: Fri, 3 Jun 2022 18:44:59 -0500 Subject: [PATCH] Started the manging bank menu --- ddbank.py | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/ddbank.py b/ddbank.py index 696ffce..6c1351c 100755 --- a/ddbank.py +++ b/ddbank.py @@ -1,6 +1,29 @@ #!/usr/bin/env python3 import sqlite3 import os +def manBankin(a): + while True: + bankNam = a.split(".")[0] + print(""" + 1. Withdraw + 2. Deposit + 3. Transfer + 4. User Balance check + Q. Quit/Go Back + """) + userIn = input(f"Bank/{bankNam}: ") + if userIn == "1": + print("Withdraw") + elif userIn == "2": + print("Deposit") + elif userIn == "3": + print("Transfer") + elif userIn == "4": + print("User balance") + elif userIn == "q" or userIn == "Q": + break + else: + print('*** Option not understood. Please try again.') def deluser(a): userIn = input("Which user would you like to delete? ") @@ -51,22 +74,12 @@ def manageBankmenu(a): elif menuOption == '3': listuser(a) elif menuOption == '4': - print('banking menu') + manBankin(a) elif menuOption == 'q' or menuOption == 'Q': break else: print('*** Option not understood. Please try again.') -def manageBank(): - print() - #connDb = sqlite3.connect() - #cur = connDb.cursor() - #cur.execute('SELECT username from ACCOUNT;') - fmt = "{0}" - #for row in cur.fetchall(): - # print(fmt.format(*row)) - print() - def selectBank(): dirOutput = os.listdir() matchs = [match for match in dirOutput if 'db.sqlite' in match]