Mega Code Archive

 
Categories / Python / Data Type
 

Complex Numbers

#Complex numbers: represented as two floating point numbers  #the real and imaginary part.  #To extract these parts from a complex number z, use z.real and z.imag. a=1.5+0.5j print a.real print a.imag