how to get/print value to imaginary part J/j in python3-complex numbers?
I tried using print statement as below-
x=2345+4.567J print(J) print(x.J) but getting below error in python 3.7-
Traceback (most recent call last): File "", line 1, in print(J) NameError: name 'J' is not defined
Traceback (most recent call last): File "", line 1, in print(x.J) AttributeError: 'complex' object has no attribute 'J'
>>> x=2345+4.567J >>> print(J) Traceback (most recent call last): File "<pyshell#132>", line 1, in <module> print(J) NameError: name 'J' is not defined >>> print(x.J) Traceback (most recent call last): File "<pyshell#134>", line 1, in <module> print(x.J) AttributeError: 'complex' object has no attribute 'J' >>>