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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started