Python Project (2)
Python Project (2)
BSF CHHAWLA
import time as t
user_pin = 1234
user_balance = 97432.50
choice = 9
while (True):
print("\n\n")
if choice == 0:
print("Exiting...")
t.sleep(2)
break
num_of_tries = 3
while (num_of_tries!=0):
if input_pin == user_pin:
print("Account auhtorized!\n\n")
if choice == 1:
t.sleep(1.5)
break
elif choice == 2:
t.sleep(1.5)
while(True):
if withdraw_amt>user_balance:
continue
else:
user_balance-=withdraw_amt
break
else:
print("Cancelling transaction...")
t.sleep(1)
print("Transaction Cancelled!\n\n")
break
break
elif choice == 3:
t.sleep(1.5)
user_balance+=deposit_amt
else:
print("Cancelling transaction...")
t.sleep(1)
print("Transaction Cancelled!\n\n")
break
elif choice == 4:
t.sleep(1.5)
pin_new = int(input("Enter your new PIN > "))
user_pin = pin_new
else:
t.sleep(1)
print("Process Cancelled!\n\n")
break
else:
t.sleep(1.5)
else:
print("Cancelling process...")
t.sleep(1)
print("Process Cancelled!\n\n")
break
else:
num_of_tries-=1
else:
print("Exiting...")
t.sleep(2)
break
else:
print("Invalid input!")
continue
output :