Im

The imaginary part of the complex number $z$.

Example

The following example defines a complex number $z$ and prints its imaginary part

Input

Example.Quanty
-- z.Im
z=3+2*I
print("The imaginary part of z = ",z," is ",z.Im)
z.Im = -2
print("The imaginary part of z = ",z," is ",z.Im)

Result

The imaginary part of z = (3+2 I) is 2
The imaginary part of z = (3-2 I) is -2

List of all properties of complex numbers

Print/export