print(repr(9**0.5), repr(0**0.5), repr((-9)**0.5)) import cmathprint(repr(cmath.sqrt(9)), repr(cmath.sqrt(0)), repr(cmath.sqrt(-9)))
Standard input is empty
3.0 0.0 (1.836909530733566e-16+3j) (3+0j) 0j 3j
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!