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

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
主站蜘蛛池模板: 永善县| 平度市| 元阳县| 时尚| 昌宁县| 揭阳市| 深水埗区| 永年县| 夹江县| 黑龙江省| 安岳县| 建湖县| 宜阳县| 陆河县| 黑水县| 丰台区| 蒙城县| 德格县| 淮北市| 竹溪县| 巴里| 大同县| 新河县| 云林县| 兴安县| 丹巴县| 德保县| 清丰县| 永兴县| 凌海市| 京山县| 沐川县| 东源县| 绥中县| 梁平县| 宝兴县| 高台县| 晋江市| 武邑县| 新疆| 明溪县|