HackerRank Python - Polar Coordinates

You are given a complex Z. Your task is to convert it to polar coordinates

  1. # Enter your code here. Read input from STDIN. Print output to STDOUT
  2. import cmath
  3. z= input()
  4. print (abs(complex(z)))
  5. print (cmath.phase(complex(z)))


Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube