Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print('welcome to python.hub Bank ATM')
- restart=('Y')
- chances=3
- balances=999.12
- while chances>= 0:
- pin = int(input('please Enter your 4 Digit PIN: '))
- if pin == (8586):
- print('Youhave entered the pin correctly')
- print('please press 1 for your balance')
- print('please press 2 to make a withdrawl')
- print('please press 3 to pay in')
- print('please press 4 to return card\n')
- while restart not in ('n','NO','no','N'):
- print('please press 1 For your balance')
- print('please press 2 to make a withdrawl')
- print('please press 3 to pay in')
- print('please press 4 to return card')
- option = int(input('what would you like to choose?:'))
- if option == 1:
- print('Thank you')
- break
- elif option == 1:
- print(' your balance is usd',balance)
- restart = input('Would you like to choose?: ')
- if option == 1:
- print('your balance is usd',balance)
- restart = input('would you like to go back? ')
- if restart in('n','NO','no','N'):
- print('Thank You')
- break
- elif option == 2:
- option2 = ('y')
- withdrawl = float(input('how Much would you like to withdraw? 0,20,40,80,100 for other enter 1:'))
- if withdrawl in [10,20,40,60,80,100]:
- balance = balance - withdrawl
- print('\nYour balance is now usd',balance)
- restart = input('would you like to go back?')
- if restart in ('n','NO','no','N')
- print('thank you')
- break
- elif withdrawl != [10,20,40,60,80,100]:
- print('Invalid amount, olease re-try\n')
- restart = ('y')
- elif withdrawl == 1:
- withdrawl = float(input('please enter the desired amount:'))
- elif option == 3:
- pay_in = float(input('how much would you like to pay in? '))
- balance = balance + pay_in
- print('\nyourbalance is now usd', balance)
- restart = input('Would you lik to go back? ')
- if restart in ('n','NO''no','N'):
- print('Thank you')
- break
- elif option == 4:
- print('please wait while whlist your card is returned...\n')
- print('thank you for your service')
- break
- else:
- print('please enter a correct number. \n')
- restart = ('y')
- elif pin != ('8586'):
- print('Incorrect pin')
- chances = chances - 1
- if chances == 0:
- print('\nNo more tries')
- break
Add Comment
Please, Sign In to add comment