-
Notifications
You must be signed in to change notification settings - Fork 113
Expand file tree
/
Copy pathappone.py
More file actions
95 lines (46 loc) · 1.53 KB
/
appone.py
File metadata and controls
95 lines (46 loc) · 1.53 KB
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
database_user = {
'Seyi':'passwordSeyi',
'Mike':'passwordMike',
'Love':'passwordLove'
}
def login():
#login function here
name = input("What is your name? \n")
password = input("Your password? \n")
if(name in database_user and password == database_user[name]):
print("Welcome " + name)
return True
else:
print("Password or Username Incorrect. Please try again")
return False
def bankOperations():
print('These are the available options:')
print('1. Withdrawal')
print('2. Cash Deposit')
print('3. Complaint')
print('4. Logout')
selectedOption = int(input('Please select an option:'))
if(selectedOption == 1):
print('you selected %s' % selectedOption)
bankOperations()
elif(selectedOption == 2):
print('you selected %s' % selectedOption)
bankOperations()
elif(selectedOption == 3):
print('you selected %s' % selectedOption)
bankOperations()
elif(selectedOption == 4):
exit()
else:
print('Invalid Option selected, please try again')
print("Welcome, what would you like to do?")
print("1. Login")
print("2. Register")
actionSelect = int(input("Select an option \n"))
if(actionSelect == 1):
isLoginSuccessful = False
while isLoginSuccessful == False:
isLoginSuccessful = login()
bankOperations()
else:
print('Login failed, username or password incorrect')