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

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
主站蜘蛛池模板: 合水县| 隆子县| 五指山市| 马关县| 潜山县| 尼勒克县| 武汉市| 锡林浩特市| 柯坪县| 沁水县| 京山县| 许昌市| 礼泉县| 容城县| 泉州市| 简阳市| 略阳县| 柏乡县| 奉化市| 禹城市| 崇礼县| 汽车| 印江| 盐山县| 镶黄旗| 潞城市| 定结县| 河南省| 上犹县| 土默特左旗| 宝坻区| 永宁县| 怀集县| 长兴县| 元朗区| 新晃| 额敏县| 临湘市| 奉贤区| 康马县| 四子王旗|