python3xiaobaike_2020/chapter2/2-6 python3小白课:数值类型之复数.md
2025-04-20 23:22:14 +08:00

30 lines
874 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# python3小白课数值类型之复数
复数complex其实在日常不是那么常用到本课你可以忽略掉也可以了解下也可以。除非你用到高精尖的数学运算逻辑。按个人经验复数这个东西其实也基本只在学校课本中提到过了。
复数是啥?如果不是很了解的童鞋可以看一下百度百科:
[https://baike.baidu.com/item/%E5%A4%8D%E6%95%B0/254365?fr=aladdin](https://baike.baidu.com/item/%E5%A4%8D%E6%95%B0/254365?fr=aladdin)
我们来看一下一个复数如何定义即可:
```python
# coding:utf-8
a = 3 + 0.2j
print(a)
print(type(a))
```
用j或J表示虚部即可其他为实部。
> [!note]
>
> 本课不重要,理解不了可跳过。
### 单词释义
| 单词 | 释义 |
| ------- | -------------------- |
| complex | 复杂的,表示复数类型 |