-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
65 lines (51 loc) · 1.78 KB
/
main.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
from auth import *
from envvar import *
print(TITLE)
print(LICENCE + "\n")
print("-----Welcome To The Main Menu-----\n")
print(OPTIONS)
choice = input("Enter your choice:\n")
if choice == '1':
username = input("Enter your username:")
password = input("Enter your password:")
user = UserAuthentication(username, password)
user.registration()
elif choice == '2':
username = input("Enter your username:")
password = input("Enter your password:")
user = UserAuthentication(username, password)
if user.is_authenticated:
user.first_name = input("enter your first name: ")
user.last_name = input("enter your last name: ")
user.age = input("enter your age: ")
user.collect_user_info()
elif choice == '3':
username = input("Enter your username:")
password = input("Enter your password:")
user = UserAuthentication(username, password)
if user.is_authenticated:
dest_username = input("Enter the username of the destination account holder: ")
dest_user = UserAuthentication(dest_username)
if dest_user.is_user_exist:
amount = input("Enter the amount: ")
trx = Transactions(amount)
trx.transfer(username, dest_username)
else:
print('This username does not exists!')
elif choice == '4':
username = input("Enter your username:")
password = input("Enter your password:")
user = UserAuthentication(username, password)
user.show_info()
elif choice == '5':
username = input("Enter your username:")
password = input("Enter your password:")
user = UserAuthentication(username, password)
user.remove()
elif choice == '6':
print(users_list())
elif choice == '7':
exit()
else:
msg = "Invalid input! Try again later"
print(msg)