Beginners help with password program!
kjones9 at rochester.rr.com
Sun Jul 27 05:13:43 CEST 2003
For starters, I suggest you install pychecker and use it on any programs
Second, every error in python should give you some information as to what
line it occurred on. For example:
: a = b
:Traceback (most recent call last):
: File "<pyshell#29>", line 1, in ?
: a = b
:NameError: name 'b' is not defined
Here it says line 1, because this occurred in Idle. Start by going to that
line... 90% of the time, your error will be right there.
As for your file... well the line if "login == no:" looks wrong, unless
you have a variable named 'no'.. you probably want the string 'no' there.
As was mentioned, you probably won't get much help if you ask people to
debug for you. Debugging is a major part of programming, and you can't
avoid it. So get used to it and get good at it. :D (and learn to test your
code thoroughly). Finally, I recommend you use raw_input(...), rather
than input(...), and then convert the return value from a string to
whatever you need it to be.
More information about the Python-list