math module

Giorgi Lekishvili gleki at
Fri Jan 11 00:05:57 CET 2002


If you want the stuff running this way, use this:
>>>from math import *

however, this is not recommended when writing modules. Nevertheless, for
an interactive use, that works fine.


gombosk at wrote:

> I have a problem with math module:
> I import math module, because to call exp(x) or sqrt(x) does not work.
> Do I need anything else to do?
> >>> import math
> >>> exp(10)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> NameError: name 'exp' is not defined
> This is the problem...
> Katalin

More information about the Python-list mailing list