Use abs(z) to get its magnitude (as a float) or z.real to get its real part : Complex : Data Type PYTHON TUTORIALS


PYTHON TUTORIALS » Data Type » Complex »

 

Use abs(z) to get its magnitude (as a float) or z.real to get its real part


a=1.5+0.5j

print a.real
print abs(a)



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Data Type
» Complex