To extract these parts from a complex number z, use z.real and z.imag. : Complex : Data Type PYTHON TUTORIALS
Ajax
Ajax Examples
Ajax Tutorials
Scripts and Programs
Javascript
Javascript Examples Tutorials
DHTML Tutorials
Javascript References
Scripts and Programs
HTML
HTML Tutorials
HTML References
HTML DOM 0 References
HTML DOM 2 References
CSS
CSS Tutorials
CSS References
PHP
PHP Source Code
PHP References
Scripts and Programs
C#
C# Source Code
C# Examples
PYTHON TUTORIALS
»
Data Type
»
Complex
»
To extract these parts from a complex number z, use z.real and z.imag.
a=
1.5
+
0.5
j
print a.real
print a.imag
Related Scripts with Example Source Code in same category :
import cmath for Complex number
Complex Number Attributes
imaginary numbers are written with a suffix of "j" or "J"
Use abs(z) to get its magnitude (as a float) or z.real to get its real part
Complex Math
Leave a Comment / Note
Name (required)
email (will not be published) (required)
Website
Vérification
Refresh
Enter code
Verification is used to prevent unwanted posts (spam). .
PYTHON TUTORIALS
Data Type
»
Complex
Boolean
Integer format
Complex
Integer
Date
Introduction
Decimal
Long
Float format
None
Float
Octal
Hex format
Rational
Hexadecimal
Buildin Function
Buildin Module
CGI Web
Class
Collections
Data Type
Database
Dictionary
File
Function
Introduction
List
Network
Operator
Regular Expressions
Statement
String
Thread
Tkinker
Tuple
Windows
WxPython
XML