-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmenuBank.py
75 lines (62 loc) · 1.88 KB
/
menuBank.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
from bank import Bank
from colorama import Fore, Back, Style
import os
import os.path
import time
from colorama import init
init()
asw = ""
def bankMenu():
option = "0"
print("+{:-<50}+".format(""))
print('\x1b[6;30;47m' + "|{:^50}|".format("Bank System")+'\x1b[0m')
print("+{:-<50}+".format(""))
print('\x1b[1;32;40m' +
"|{:50}|".format("1. Create a new account")+'\x1b[0m')
print("+{:-<50}+".format(""))
print('\x1b[1;33;40m' + "|{:50}|".format("2. Deposit")+'\x1b[0m')
print("+{:-<50}+".format(""))
print('\x1b[1;34;40m' + "|{:50}|".format("3. Withdraw")+'\x1b[0m')
print("+{:-<50}+".format(""))
print('\x1b[1;35;40m' +
"|{:50}|".format("4. Check your bank movements")+'\x1b[0m')
print("+{:-<50}+".format(""))
time.sleep(1)
option = input("Choose one option: ")
print("+{:-<50}+".format(""))
print("")
time.sleep(2)
if option == "1":
Bank.newAccount("")
elif option == "2":
Bank.deposit("")
elif option == "3":
Bank.withdraw("")
elif option == "4":
Bank.checkMovements("")
else:
print("+{:-<50}+".format(""))
print('\x1b[0;37;41m' +
"|{:^50}|".format("Option doesn't exist")+'\x1b[0m')
print("+{:-<50}+".format(""))
exit
def initAll():
bankMenu()
asw = input("Do you want to continue? (Y/N): ").upper()
while asw == 'Y':
os.system('cls')
initAll()
if asw == 'N':
print("+{:-<50}+".format(""))
print('\x1b[6;30;43m' +
"|{:^50}|".format("Thanks for use this program")+'\x1b[0m')
print("+{:-<50}+".format(""))
exit
else:
print("+{:-<50}+".format(""))
print('\x1b[0;37;41m' +
"|{:^50}|".format("Option doesn't exist")+'\x1b[0m')
print("+{:-<50}+".format(""))
time.sleep(2)
initAll()
initAll()