[Tutor] power of 2.718282
Kent Johnson
kent37 at tds.net
Tue Jan 13 19:33:53 CET 2009
On Tue, Jan 13, 2009 at 1:19 PM, culpritNr1 <ig2ar-saf1 at yahoo.co.uk> wrote:
>
> Hello All,
>
> It such a simple question, but because of that, googling for an answer just
> pulls the wrong results.
>
> How do I compute a power of e in Python?
>
> Say I need 2.718282 to the 10th. In R for example, I just do exp(10).
import math
math.exp(10)
http://docs.python.org/library/math.html#math.exp
Kent
More information about the Tutor
mailing list