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

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
主站蜘蛛池模板: 嘉兴市| 余姚市| 台湾省| 都兰县| 随州市| 侯马市| 增城市| 五峰| 深圳市| 襄垣县| 潼南县| 塔城市| 旬阳县| 高唐县| 德钦县| 正阳县| 司法| 奇台县| 海安县| 阿尔山市| 宁阳县| 八宿县| 江达县| 广宁县| 苍山县| 汝城县| 临武县| 苏尼特右旗| 杭州市| 秦皇岛市| 大丰市| 延寿县| 绥滨县| 赤峰市| 南和县| 丽江市| 枝江市| 西乌珠穆沁旗| 桐庐县| 曲麻莱县| 松滋市|