-
Notifications
You must be signed in to change notification settings - Fork 0
/
Mock ATM.py
49 lines (36 loc) · 1.6 KB
/
Mock ATM.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
name = input('What is your name? \n')
allowedUsers = ['Seyi','Mike','Love']
allowedPassword = ['passwordSeyi','passwordMike','passwordLove']
if(name in allowedUsers):
password = input('Your password? \n')
userId = allowedUsers.index(name)
while True:
if(password == allowedPassword[userId]):
import datetime
x = datetime.datetime.now()
print(x)
print('Welcome %s' % name)
print('These are the available options:')
print('1. Withdrawal')
print('2. Cash Deposit')
print('3. Complaint')
selectedOption = int(input('Please select an option:'))
if(selectedOption == 1):
print('You selected %s' % selectedOption)
input('How much would you like to withdraw? \n')
print('Take your cash')
elif(selectedOption ==2):
print('You selected %s' % selectedOption)
currentBalance = input('How much would you like to deposit? \n')
print('Your current balance is $ %s' % currentBalance)
elif(selectedOption == 3):
print('You selected %s' % selectedOption)
input('What issue will you like to report? \n')
print('Thank you for contacting us')
else:
print('Invalid Option selected, please try again')
else:
print('Password Incorrect, please try again')
break
else:
print('Name not found, please try again')