Hello,

Can someone provide me with an error checking example about an x
variable that needs to be number only? I used something like:

 def useridf():
     print ""
     print "WARNING: If you don't understand why this must be unique,
exit and read the manual."
     print ""
     userid = input("x : ")

I know that "input" accepts only numbers, but I don't want the program
to break if someone puts other chars in it. I want to, print "Only
numbers are accepted." which is easy. But still I can't understand how
to do the check using if/elif/else statements.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to