- Learn Python in 7 Days
- Mohit Bhaskar N. Das
- 139字
- 2021-07-09 20:40:24
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
Source: https://en.wikipedia.org/wiki/Complex_number
推薦閱讀
- OpenDaylight Cookbook
- Learning Flask Framework
- Ext JS Data-driven Application Design
- x86匯編語言:從實(shí)模式到保護(hù)模式(第2版)
- The Data Visualization Workshop
- Hands-On Functional Programming with TypeScript
- Visual Basic程序設(shè)計實(shí)踐教程
- Access 2010數(shù)據(jù)庫應(yīng)用技術(shù)(第2版)
- Haskell Data Analysis Cookbook
- Microsoft Azure Storage Essentials
- Beginning C++ Game Programming
- Image Processing with ImageJ
- Visual Studio Code 權(quán)威指南
- Akka入門與實(shí)踐
- C# 7.1 and .NET Core 2.0:Modern Cross-Platform Development(Third Edition)