From a8ae8a4e0fe3964b9165f83a492c43ae57a39c05 Mon Sep 17 00:00:00 2001 From: theissenm Date: Tue, 19 Apr 2022 03:29:45 -0500 Subject: [PATCH] Upload files to '' --- ddbank.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ddbank.py diff --git a/ddbank.py b/ddbank.py new file mode 100644 index 0000000..2b016cb --- /dev/null +++ b/ddbank.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python3 +import sqlite3 +import os + +def selectBank(): + print('Make things to select the bank...') + +def addBank(): + bankName = input("What would you like to call this bank? ") + bankName = bankName+".db.sqlite" + connDb = sqlite3.connect(bankName) + connDb.execute('''CREATE TABLE ACCOUNT + (ID INT PRIMARY KEY NOT NULL UNIQUE, + USERNAME TEXT NOT NULL, + TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP);''') + connDb.close() + os.system('clear') + print() + print(f'*** Added bank {bankName}') + print() + +while True: + print(""" + 1. Select a Bank. + 2. Add new bank. + 3. List banks. + 4. Delete a bank. + Q to quit. + """) + mainOption = input("Choose an option: ") + if mainOption == '1': + print('Place function here.') + elif mainOption == '2': + addBank() + elif mainOption == '3': + print('Place function here.') + elif mainOption == '4': + print('Place function here.') + elif mainOption == 'Q' or mainOption == 'q': + break + else: + print() + print('*** Option not understood. Please try again.') + + +