官术网_书友最值得收藏!

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
主站蜘蛛池模板: 北川| 平顺县| 遵义县| 深水埗区| 任丘市| 宣武区| 武威市| 隆子县| 阿图什市| 嘉鱼县| 姜堰市| 资源县| 南阳市| 施甸县| 县级市| 台东县| 宁德市| 绍兴市| 广昌县| 徐汇区| 达孜县| 时尚| 阜宁县| 兴化市| 大冶市| 新津县| 昆山市| 江津市| 彭泽县| 甘孜县| 宿松县| 巴南区| 九龙县| 香格里拉县| 云阳县| 兰州市| 孟村| 乌拉特后旗| 大悟县| 阿巴嘎旗| 仙桃市|