This assigment comprises of applying the basics of python to create your own complex number calculator.
- x: int64, float64, represents real component of the complex number
- y: int64, float64, represents imaginary component of the complex number
Example, complex_numbers(3, 5) means 3 is the real part of the complex number and 5 is the imaginary part of the complex number. Such a number is represented as 3 + 5i.
Define the following operations for the class:
-
'+' (complex number addition)
-
'-' (complex number subtraction)
-
'*' (complex number multiplication)
-
'/' (complex number division)
-
Note that these operations should be compatible with
intandfloatdatatypes as well
Also, define the following methods.
- abs() that returns absolute value of the complex number
- argument() that returns argument of the complex number
- conjugate() that returns conjugate of the complex number