I suggest using pychecker. It helps if you have spelling issues like I do:
pychecker.sourceforge.net/
Its sorta like lint for python.
--Michael
On 1/13/08, John Fouhy <[EMAIL PROTECTED]> wrote:
> On 14/01/2008, bill.wu <[EMAIL PROTECTED]> wrote:
> > mumber = 23
> > running = Ture
> [...
On 14/01/2008, bill.wu <[EMAIL PROTECTED]> wrote:
> mumber = 23
> running = Ture
[...]
> when i run it, interactive window show:
>
> Traceback (most recent call last):
[...]
> NameError: name 'Ture' is not defined
Hi Bill,
The error message means that python doesn't know what "Ture" is. In
this
mumber = 23
running = Ture
Both these lines have spelling errors: 'mumber' should be 'number',
and 'Ture' should be 'True'.
You can see where the problem is coming from by the end of your
traceback:
NameError: name 'Ture' is not defined
A NameError with something being 'not defined'
mumber = 23
running = Ture
while running:
guess = int(raw_input('Enter an integer :'))
if guess == number:
print 'congratulations, you guessed it.'
running = False
elif guess < number:
print 'no, it is a little higher than that'
else:
print 'no