Newbie simple question - can't find answer

Fredrik Lundh fredrik at pythonware.com
Tue Jan 11 10:51:57 EST 2000


eleisonme at juno.com wrote:
> I do not seem to be able to use any of the math or cmath functions
> either in a script or on the python command line.
> 
> For example if I type:
> >>>import math
> >>>exp (4)
> 
> OR
> 
> >>>exp(4)
> 
> I get a traceback error:
> NameError: exp (or any other math function that I try to use).

>>> import math
>>> math.exp(4)
54.5981500331

>>> from math import *
>>> exp(4)
54.5981500331

additional info:
http://www.python.org/doc/current/tut/node8.html
http://www.pythonware.com/people/fredrik/fyi/fyi06.htm

</F>





More information about the Python-list mailing list