The program is to accept a choice from the user.
Choice 1 to check the deposit
Choice 2 to make a deposit - when I entered choice two it should accept a deposit that is greater than 0 but less than 100,000, if this condition is not met then the program should prompt the user to enter the deposit until the condition is met.
If the condition is met, then the program should add the deposit entered to 30,000 and print the result.
My problem is even if the deposit is greater than 100,000 or less than 0, it is still printing the result and it should only prompt the user to enter the deposit until it is greater than 0 or less than 100,000.
What could be the error or problem in my code?
balance = 30000
choice = int(input("Enter 1 to Check Balance\nEnter 2 to deposit\nEnter 3 to withdrawl\n:"))
if choice == 1:
print("Your balance is $",balance)
if choice == 2:
while True:
deposit= float(input("Enter the deposit you would like to make:"))
if deposit < 0 or deposit > 100000:
print("INVALID ENTRY! The deposit must not be less than 0 or greater than 100000.")
if(deposit < 0 and deposit > 100000):
continue;
newbalance = deposit + balance
print("Your balance is $", newbalance)