How hard can this be? It worked

Patrick Kirk pknews at kirks.net
Mon May 21 15:39:27 EDT 2001


Thanks all.  Declaring the variable and adding white space fixed it.

>>> import math
>>> x = 4
>>> if x > 0:
...  print "x is positive"
...
x is positive
>>> if x%2 == 0:
...   print x, "is even"
... else:
...   print x, "is odd"
...
4 is even
>>>





More information about the Python-list mailing list