sandeeo758

Untitled

Jul 7th, 2020
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.22 KB | None | 0 0
  1. print('welcome to python.hub Bank ATM')
  2. restart=('Y')
  3. chances=3
  4. balances=999.12
  5. while chances>= 0:
  6. pin = int(input('please Enter your 4 Digit PIN: '))
  7. if pin == (8586):
  8. print('Youhave entered the pin correctly')
  9. print('please press 1 for your balance')
  10. print('please press 2 to make a withdrawl')
  11. print('please press 3 to pay in')
  12. print('please press 4 to return card\n')
  13. while restart not in ('n','NO','no','N'):
  14. print('please press 1 For your balance')
  15. print('please press 2 to make a withdrawl')
  16. print('please press 3 to pay in')
  17. print('please press 4 to return card')
  18. option = int(input('what would you like to choose?:'))
  19. if option == 1:
  20. print('Thank you')
  21. break
  22. elif option == 1:
  23. print(' your balance is usd',balance)
  24. restart = input('Would you like to choose?: ')
  25. if option == 1:
  26. print('your balance is usd',balance)
  27. restart = input('would you like to go back? ')
  28. if restart in('n','NO','no','N'):
  29. print('Thank You')
  30. break
  31. elif option == 2:
  32. option2 = ('y')
  33. withdrawl = float(input('how Much would you like to withdraw? 0,20,40,80,100 for other enter 1:'))
  34. if withdrawl in [10,20,40,60,80,100]:
  35. balance = balance - withdrawl
  36. print('\nYour balance is now usd',balance)
  37. restart = input('would you like to go back?')
  38. if restart in ('n','NO','no','N')
  39. print('thank you')
  40. break
  41. elif withdrawl != [10,20,40,60,80,100]:
  42. print('Invalid amount, olease re-try\n')
  43. restart = ('y')
  44. elif withdrawl == 1:
  45. withdrawl = float(input('please enter the desired amount:'))
  46.  
  47. elif option == 3:
  48. pay_in = float(input('how much would you like to pay in? '))
  49. balance = balance + pay_in
  50. print('\nyourbalance is now usd', balance)
  51. restart = input('Would you lik to go back? ')
  52. if restart in ('n','NO''no','N'):
  53. print('Thank you')
  54. break
  55. elif option == 4:
  56. print('please wait while whlist your card is returned...\n')
  57. print('thank you for your service')
  58. break
  59. else:
  60. print('please enter a correct number. \n')
  61. restart = ('y')
  62. elif pin != ('8586'):
  63. print('Incorrect pin')
  64. chances = chances - 1
  65. if chances == 0:
  66. print('\nNo more tries')
  67. break
Add Comment
Please, Sign In to add comment