You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Convert the number 3 and imaginary number 5 into a complex number:
x = complex(3, 5)
# Definition and Usage
# The complex() function returns a complex number by specifying a real number and an imaginary number.
# Syntax
# complex(real, imaginary)
# Parameter Values
# Parameter Description
# real Required. A number representing the real part of the complex number. Default 0. The real number can also be a String, like this '3+5j', when this is the case, the second parameter should be omitted.
# imaginary Optional. A number representing the imaginary part of the complex number. Default 0.