Python complex() is an inbuilt function that returns a complex number by specifying a real number and an imaginary number. It returns a complex number when real and imaginary parts are provided, or it converts a string to a complex number.

#What is Complex Number

The complex number is represented by the “ x + yi“.

Python converts the real numbers x and y into the complex using the function complex(x,y). The real part can be accessed using a function real(), and the imaginary part can be represented by imag().

Geometrically, the phase of the complex number is an angle between the positive real axis and a vector representing the complex number. This is also known as the argument of the complex number.

#python #python complex

Python complex: How to Create Complex Number in Python
1.90 GEEK