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 342 views
2 answers 367 views
1 answer 242 views
1 answer 243 views
243 views asked Apr 25, 2021 by avibootz
1 answer 277 views
1 answer 225 views
225 views asked Apr 25, 2021 by avibootz
...