Polar Coordinates

  • + 0 comments
    from cmath import phase
    import re
    
    r = input()
    reg = re.findall('[+|-]*[0-9]+', r)
    
    x, y = map(int, reg)
    
    print(abs(complex(x, y)))
    print(phase(complex(x, y)))