+

Python | cmath.exp () method

Using the cmath.exp() method, we can find the exponent of any number by passing it to cmath.exp () .

Syntax: cmath.exp (value)
Return: Return the exponential value.

Example # 1:
In this example we see that with cmath.exp () we can get exponent values , passing it any value.

# import cmath library

import cmath

 
# using the method cmath.exp ()

gfg = cmath.exp ( 5 )

  

print (gfg)

Output:

(148.4131591025766 + 0j)

Example # 2:

# import of cmath library

import cmath

 
# using the cmath.exp () method

gfg = cmath.exp ( - 16 )

 

print (gfg)

Exit:

(1.1253517471925912e-07 + 0j)

Get Solution for free from DataCamp guru