The exp() function returns the mathematical e raised to the power of a specific number. Here, e is the base of the natural logarithm. Figure 1 shows the mathematical representation of the exp() function.
The
mathmodule is required to use this function.
exp(number)
This function requires a number as a parameter.
exp() returns the mathematical e raised to the power of the specific number sent as a parameter.
import math#positive numberprint "exp(10) : ", math.exp(10)#negative numberprint "exp(-2) : ", math.exp(-2)#zeroprint "exp(0) : ", math.exp(0)