- polor() is python function defined in cmath library, which return the polor form of the complex function or a pair (r,ph)
- where r is modulus of complex number and ph is a phase of the complex number.
Syntax-
cmath.polor(num)
-Here cmath is a library in which polor() function is defined
-num is a complex number whose polor form we required.
program-
import cmath
n=complex(12,6)
print("Complex number is ",n)
print("polor form is is ",cmath.polar(n))
n=complex(1,6)
print("Complex number is ",n)
print("polor form is is ",cmath.polar(n))
n=complex(0,1)
print("Complex number is ",n)
print("polor form is ",cmath.polar(n))
n=complex(0,0)
print("Complex number is ",n)
print("polor form is ",cmath.polar(n))
Complex number is (12+6j)
polor form is is (13.416407864998739, 0.4636476090008061)
Complex number is (1+6j)
polor form is is (6.082762530298219, 1.4056476493802699)
Complex number is 1j
polor form is (1.0, 1.5707963267948966)
Complex number is 0j
polor form is (0.0, 0.0)