Atm Project
Atm Project
# comparing pin
while count < 3:
print('------------------')
print('******************')
pin = str(input('PLEASE ENTER PIN: '))
print('******************')
print('------------------')
if pin.isdigit():
if user == users[0]:
if pin == pins[0]:
break
else:
count += 1
print('-----------')
print('***********')
print('INVALID PIN')
print('***********')
print('-----------')
print()
if user == users[1]:
if pin == pins[1]:
break
else:
count += 1
print('-----------')
print('***********')
print('INVALID PIN')
print('***********')
print('-----------')
print()
if user == users[2]:
if pin == pins[2]:
break
else:
count += 1
print('-----------')
print('***********')
print('INVALID PIN')
print('***********')
print('-----------')
print()
else:
print('------------------------')
print('************************')
print('PIN CONSISTS OF 4 DIGITS')
print('************************')
print('------------------------')
count += 1
print('-------------------------')
print('*************************')
print('LOGIN SUCCESFUL, CONTINUE')
print('*************************')
print('-------------------------')
print()
print('--------------------------')
print('**************************')
print(str.capitalize(users[n]), 'welcome to ATM')
print('**************************')
print('----------ATM SYSTEM-----------')
# Main menu
while True:
print('-------------------------------')
print('*******************************')
response = input('SELECT FROM FOLLOWING OPTIONS: \
nStatement__(S) \nWithdraw___(W) \nLodgement__(L) \nChange PIN_(P) \
nQuit_______(Q) \n: ').lower()
print('*******************************')
print('-------------------------------')
valid_responses = ['s', 'w', 'l', 'p', 'q']
response = response.lower()
if response == 's':
print('---------------------------------------------')
print('*********************************************')
print(str.capitalize(users[n]), 'YOU HAVE ', amounts[n],'RUPEES ON
YOUR ACCOUNT.')
print('*********************************************')
print('---------------------------------------------')
print('******************************************************')
print('AMOUNT YOU WANT TO WITHDRAW MUST TO MATCH
10 RUPEES NOTES')
print('******************************************************')
print('------------------------------------------------------')
elif cash_out > amounts[n]:
print('-----------------------------')
print('*****************************')
print('YOU HAVE INSUFFICIENT BALANCE')
print('*****************************')
print('-----------------------------')
else:
amounts[n] = amounts[n] - cash_out
print('-----------------------------------')
print('***********************************')
print('YOUR NEW BALANCE IS: ', amounts[n], 'RUPEES')
print('***********************************')
print('-----------------------------------')
output:-
ENTER USER NAME: "jitendra"
jitendra
------------------
******************
******************
------------------
-------------------------
*************************
*************************
-------------------------
()
--------------------------
**************************
**************************
----------ATM SYSTEM-----------
-------------------------------
*******************************
Statement__(S)
Withdraw___(W)
Lodgement__(L)
Change PIN_(P)
Quit_______(Q)
: "S"
*******************************
-------------------------------
---------------------------------------------
*********************************************
*********************************************
---------------------------------------------
-------------------------------
*******************************
Statement__(S)
Withdraw___(W)
Lodgement__(L)
Change PIN_(P)
Quit_______(Q)
: "W"
*******************************
-------------------------------
---------------------------------------------
*********************************************
*********************************************
---------------------------------------------
-----------------------------------
***********************************
('YOUR NEW BALANCE IS: ', 600, 'RUPEES')
***********************************
-----------------------------------
-------------------------------
*******************************
Statement__(S)
Withdraw___(W)
Lodgement__(L)
Change PIN_(P)
Quit_______(Q)
: "L"
*******************************
-------------------------------
()
---------------------------------------------
*********************************************
*********************************************
---------------------------------------------
()
----------------------------------------
****************************************
****************************************
----------------------------------------
-------------------------------
*******************************
Statement__(S)
Withdraw___(W)
Lodgement__(L)
Change PIN_(P)
Quit_______(Q)
: "P"
*******************************
-------------------------------
-----------------------------
*****************************
*****************************
-----------------------------
------------------
******************
*******************
-------------------
-------------------------------
*******************************
Statement__(S)
Withdraw___(W)
Lodgement__(L)
Change PIN_(P)
Quit_______(Q)
: q