I'm studying programming with Python but I can't solve the problem now.
In the 11th and 13th rows, if withdrawal is denied, I want to make it to repeat the 10th row input("Enter amount of withdrawal")
...but using continue
goes to selection=input("Make a selection from the option menu:")
. What should I do?
balance=1000
print("Options:\n1. Make a Deposit\n 2. Make a Withdrawal\n3. Obtain Balance\n4. Quit")
while True:
selection=input("Make a selection from the option menu:")
if selection=='1':
deposit=float(input("Enter amount of deposit:"))
balance+=deposit
print("Deposit Processed.")
if selection=='2':
withdrawal=float(input("Enter amount of withdrawal:"))
if withdrawal>balance:
print("Denied. Maximum withdrawal is $","{0:,.2f}".format(balance))
continue # ***In this process, if withdrawal is denied, I wanna the 10th row..but using continue goes to selection=input("Make a selection from the option menu:") . What should I do?***
if withdrawal<=balance:
balance-=withdrawal
print("Withdrawal Processed.")
if selection=='3':
print('$','{0:,.2f}'.format(balance))
if selection=='4':
break