fork download
  1.  
  2. import cmath
  3.  
  4. n = -3
  5.  
  6. print(n **(1/2))
  7. print(cmath.sqrt(n))
Success #stdin #stdout 0.02s 9564KB
stdin
Standard input is empty
stdout
(1.0605752387249068e-16+1.7320508075688772j)
1.7320508075688772j