math module

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


Hi!

If you want the stuff running this way, use this:
>>>from math import *
>>>exp(10)
22026.465794806718

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

Grtz,
Giorgi

gombosk at vas.birosag.hu 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