Polar Coordinates

  • + 0 comments
    import cmath
    # generating a functhion << r_phase >>
    
    def r_phase(n=complex(input())):   # value must not be string so it's complex 
    
        print(f'{cmath.polar(n)[0]}\n{cmath.polar(n)[1]}')   #show abs and phase in    two lines
    
    r_phase()