How to use complex number built-in accessors in Python

1 Answer

0 votes
cn = 4+7j

print(cn.real)
print(cn.imag)
print(cn.conjugate())

 
'''
run:

4.0
7.0
(4-7j)

'''

 



answered Dec 8, 2018 by avibootz

Related questions

1 answer 252 views
2 answers 252 views
1 answer 160 views
1 answer 171 views
171 views asked Apr 25, 2021 by avibootz
1 answer 192 views
1 answer 152 views
152 views asked Apr 25, 2021 by avibootz
...