Polar Co-Ordinates
Objective
Polar coordinates are an alternative way of representing Cartesian coordinates or Complex Numbers.
z=x+yj
is completely determined by its real part and imaginary part .
Here, is the imaginary unit.
Solution:
a=complex(input()) import cmath print(abs(a)) print(cmath.phase(complex(a))) |
Note:
This Code is Verified by all Test Cases.If any error occurs then Comment correct code Below in comment box.
Disclaimer:-
The above hole problem statement is given by hackerrank.com, but the solution is generated by the CodexRitik . if any of the query regarding this post or website fill the following contact form Thank You.
Polar Coordinates - Hackerrank solution
Reviewed by CodexRitik
on
June 01, 2020
Rating:
![Polar Coordinates - Hackerrank solution](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT-c2YJMTy15gzM_68mgjlWh8aRvW1TfvMU2hZ_RVoVJ2j3U3ve3GINiJGULOraG4GMzWbuYx720zKYrIPVk5TH8g6V9aVtjkxFEKjp3cj-DlDBF-bWIKZpjJS4sT7DPTmCINm1E02Ofc/s72-w200-c-h146/PicsArt_12-05-08.28.13%255B1%255D.jpg)
No comments: