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

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
主站蜘蛛池模板: 九龙坡区| 阜城县| 滦平县| 伊川县| 壤塘县| 内黄县| 嫩江县| 桑日县| 南昌县| 清水县| 仙游县| 剑川县| 顺义区| 华蓥市| 图们市| 尼勒克县| 怀远县| 阿合奇县| 双鸭山市| 资兴市| 杨浦区| 仙游县| 延津县| 沭阳县| 阜康市| 广西| 东乌珠穆沁旗| 舒城县| 资兴市| 万全县| 永济市| 灵丘县| 合作市| 青神县| 都江堰市| 武宁县| 盐池县| 那坡县| 冷水江市| 平阳县| 建始县|