You are on page 1of 3

print("Welcome to the indian bank")

restart = ("Y")

chances = 3
Balance = 20000

while chances >=0:

pin = int(input("Enter The 4 Digit Pin : "))

if pin == (1233):
print("you entered a correct pin\n")
while restart not in ('n', 'No', 'no', 'N'):
print('press 1 to check a balance \n')

print('press 2 for cash withdrawl\n')


print("press 3 for pay in\n")

print("press 4 for return the card\n")


option = int(input("Enter Your Option : \n"))

if option == 1:

print('Your balance Is : ', Balance )


restart = input("would you like go back")
if restart in('n','NO','no','N'):

print('Thank You')

break

elif option == 2:

option2 = ('Y')
withdrawl = int(input('Enter THe Amount You Want
Withdrawl :\n $10,$20,$40,$60,$80,$100 \n :' ))

if withdrawl in [10, 20, 40, 60, 80, 100]:

Balance = Balance - withdrawl


print("Your Balance is ", Balance)

restart = ("Would you want go back")

if restart in ('n','NO','no','N'):

print("Thank You")
break
elif withdrawl != [10, 20, 40, 60, 80, 100]:

print("Invalid amount Please try again \n")


restart = ('Y')

elif withdrawl == 1:

withdrawl = float(input("Enter the amount you want :"))


elif option == 3 :

pay_in = float(input("Enter the amount you want to pay


:\n"))

Balance = Balance + pay_in


print('Your Balance is :\n',Balance)

restart = input("GO Back :")

if restart in ('n','NO','no','N'):
print('Thank You')

break
elif option ==4 :

print("please wait for your card\n")

print("Thank You")
break

else:

print("enter the correct Number :\n")

restart = ('Y')
elif pin != (1233):
print('Wrong Pin')
chances = chances - 1

if chances == 0:
print("No More Attempt Left")

break

You might also like