complex.conjugate()

http://www.adilwaseem.com/

Definition
The method return complex conjugate().

Syntax
complex(x).conjugate()

Parameters
number

Examples
complex.conjugate()
The method return with the complex conjugate.
 >>> complex(15+0j).conjugate()
(15-0j)

The method returns the output as:
 >>> complex(2255888+0j).conjugate()
(2255888-0j)


class.....: def.....: complex().conjugate()
The class method return the complex values and tested the equality of the values.
 class complex_value:
    def __init__(self, a,b,c):

        self.a=complex(a).conjugate()
        self.b=complex(b).imag
        self.c=complex(c).real

        print("The comlex conjugate value of a is: ",self.a)
        print("The complex imag value of b is: ",self.b)
        print("The complex  real value of c is: ",self.c)
        
        if self.a.__eq__(complex(a).conjugate()):
            print("The value of a is equal to complex(a) conjugate")
        else:
             print("The value of a is NOT equal to complex(a) conjugate")
            

        if self.b.__eq__(complex(b).imag):
            print("The value of b is equal to complex(b) imag")
        else:
            print("The value of b is NOT equal to complex(b) imag")


        if self.c.__eq__(complex(c).real):
            print("The value of c is equal to complex(c) imag")
        else:
            print("The value of c is NOT equal to complex(c) imag")

           
value1=81
value2=222
value3=33
complex_value(value1,value2, value3)

>>> 
The comlex conjugate value of a is: (81-0j)
The complex imag value of b is: 0.0
The complex real value of c is: 33.0
The value of a is equal to complex(a) conjugate
The value of b is equal to complex(b) imag
The value of c is equal to complex(c) imag
>>>

Comments