I'm attempting to create a program where the user inputs their account number
(which must be 8 digits) and if what the user enters is not 8 digits in length
I want python to tell the user this is invalid and then keep asking for the
account number until a suitable number has been entered.
I'm guessing it's a sort of while loop but I'm not 100% sure as I'm quite new
to Python.
So far I have...
userAccountNumber = eval(input("Please Input Your Account Number:"))
while userAccountNumber > 100000000 or <=9999999:
print userAccountNumber ("Invalid Account Number! Account Must Be Eight
Digits")
When I run this however it gives me an invalid syntax and highlights the = in
<=9999999:
Would appreciate any help with sorting this out.
Thank you.
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor