Polar Coordinates problem solution in Python. The following code is the solution of the HackerRank Polar Coordinates Python Math problem.
Code:
import cmath
input = complex( input() )
print( abs(input) )
print( cmath.phase(input) )
Test Input:
1+2j
Test Output:
2.23606797749979
1.1071487177940904