Question: Can someone please help me with my Python code? For some reason the account number is not updating. It should be counting up by one
Can someone please help me with my Python code? For some reason the account number is not updating. It should be counting up by one after each loop. Thank you.
i = 1000 while True: accNo = i print("Account number: ", accNo) name = str(input("\tEnter the account holders name: ")) while name.isnumeric(): print("\tEnter characters only") name = str(input("\tEnter the account holders name: "))
type = str(input("\tEnter the type of account [C/S]: ")) while (type != 'C' and type != 'S'): print("\tInvalid input") type = str(input("\tEnter the type of account [C/S]: "))
while True: try: deposit = eval(input("\tEnter the initial deposit amount: ")) while deposit < 0: print("\tError! Deposit cannot be negative") deposit = eval(input("\tEnter your account number: ")) break except NameError: print("\tError! Account must be a number") print("\tAccount Created") ++i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
