How hard can this be?
Alexandre Fayolle
alf at orion.logilab.fr
Mon May 21 11:28:52 EDT 2001
On Mon, 21 May 2001 16:12:44 +0100, Patrick Kirk <pknews at kirks.net> wrote:
> if x > 0:
> print "x is positive"
>
>You would think anyone could enter that but I can't. I get the following:
>
>>>> import math
>>>> if x > 0:
>... print "x is positive"
>...
>Traceback (innermost last):
> File "<stdin>", line 1, in ?
>NameError: x
You have not defined x. Try assigning a value tu x (e.g. x=1) before running
the code and things should be nicer.
Alexandre Fayolle
--
http://www.logilab.com
Narval is the first software agent available as free software (GPL).
LOGILAB, Paris (France).
More information about the Python-list
mailing list