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 348 views
2 answers 373 views
1 answer 246 views
1 answer 247 views
247 views asked Apr 25, 2021 by avibootz
1 answer 284 views
1 answer 232 views
232 views asked Apr 25, 2021 by avibootz
...