HackerRank Python - Polar Coordinates
You are given a complex Z. Your task is to convert it to polar coordinates
- # Enter your code here. Read input from STDIN. Print output to STDOUT
-
- import cmath
- z= input()
- print (abs(complex(z)))
- print (cmath.phase(complex(z)))