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

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
主站蜘蛛池模板: 吴忠市| 阿鲁科尔沁旗| 新邵县| 堆龙德庆县| 关岭| 临潭县| 九台市| 棋牌| 东平县| 山阴县| 清新县| 房山区| 广宁县| 定州市| 抚顺县| 六盘水市| 阿城市| 攀枝花市| 株洲县| 洞头县| 泸水县| 大港区| 湖口县| 河池市| 革吉县| 桐乡市| 高唐县| 新兴县| 岑巩县| 文水县| 怀远县| 桦川县| 尤溪县| 马公市| 新蔡县| 瑞丽市| 乌拉特前旗| 屏东市| 大宁县| 鄯善县| 肥乡县|