- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunctions_complex().py
More file actions
Latest commit
24 lines (16 loc) · 805 Bytes
/
Copy pathFunctions_complex().py
File metadata and controls
24 lines (16 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Python complex() Function
# Example
# Convert the number 3 and imaginary number 5 into a complex number:
x=complex(3, 5)
# Definition and Usage
# The complex() function returns a complex number by specifying a real number and an imaginary number.
# Syntax
# complex(real, imaginary)
# Parameter Values
# Parameter Description
# real Required. A number representing the real part of the complex number. Default 0. The real number can also be a String, like this '3+5j', when this is the case, the second parameter should be omitted.
# imaginary Optional. A number representing the imaginary part of the complex number. Default 0.
# More Examples
# Example
# Convert a string into a complex number:
x=complex('3+5j')