Yes, your use of j is incorrect. Use complex() to represent complex numbers rather than trying to calculate them with sqrt().
import cmath
complex(0, 1) + cmath.exp(complex(0, cmath.pi))
(-1+1.0000000000000002j)
From the help() output of complex()
class complex(object)
| complex(real=0, imag=0)
|
| Create a complex number from a real part and an optional imaginary part.
|
| This is equivalent to (real + imag*1j) where imag defaults to 0.
As @mkrieger1 points out in the comments, a simpler solution is
1j + cmath.exp(1j * cmath.pi)
"i + e^(i * pi)"(BTW it's not an equation, there is no=in it)cmath.sqrt()coming from? There is no square root in the formula you posted.