Easy Tutorial
❮ Python Shellsort Python Helloworld ❯

Python math.exp() Method

Python math Module

The math.exp(x) method in Python returns e raised to the power of x.

Python Version: 1.6.1

Syntax

The syntax for the math.exp() method is as follows:

math.exp(x)

Parameter:

Return Value

A floating-point value representing e raised to the power of x.

Example

The following example demonstrates using different exponents:

# Import math package
import math

# Specify different exponents
print(math.exp(65))
print(math.exp(-6.89))

Output:

1.6948892444103338e+28
0.0010179138409954387

Python math Module

❮ Python Shellsort Python Helloworld ❯