Polar Coordinates

  • + 0 comments

    This one is good though. I just used the polar function of cmath class. And then i printed the distance and phase by just giving the indices of the tuple i.e [0] and [1]. Hope this helps!!

    import cmath
    z=complex(input())
    print(cmath.polar(z)[0])
    print(cmath.polar(z)[1])