- Learn Python in 7 Days
- Mohit Bhaskar N. Das
- 139字
- 2021-07-09 20:40:24
Complex numbers
A complex number has both real and imaginary parts, and Python allows you to specify this data type in a very easy and convenient way.
Syntax:
<variable name>=complex(x,y)
OR
<variable name>=x+yj
Here, x is the real part and y is the imaginary part. Here, j plays the role of iota.
It will be clearer with the following screenshot:

Here, we declare two variables to denote complex numbers. One way to achieve is to use complex() method and the other way is to use the standard notation as used in mathematics.
In standard complex number notation, x+ij, i is used to denote the starting of the imaginary part and stands for iota. j denotes the imaginary part. The credit for conceiving the idea of complex numbers goes to Italian mathematician Gerolamo Cardano in 1545.
Source: https://en.wikipedia.org/wiki/Complex_number
Source: https://en.wikipedia.org/wiki/Complex_number
推薦閱讀
- Cocos2D-X權威指南(第2版)
- Getting Started with PowerShell
- Java面向對象程序開發及實戰
- 人臉識別原理及算法:動態人臉識別系統研究
- 人人都是網站分析師:從分析師的視角理解網站和解讀數據
- Web程序設計(第二版)
- Kali Linux Wireless Penetration Testing Beginner's Guide(Third Edition)
- C語言實驗指導及習題解析
- PLC編程與調試技術(松下系列)
- Linux命令行與shell腳本編程大全(第4版)
- HTML5開發精要與實例詳解
- Learning Cocos2d-JS Game Development
- 詩意的邊緣
- LabVIEW數據采集(第2版)
- Expert Cube Development with SSAS Multidimensional Models