Python中的math 模块和cmath 模块
Python中的数学运算常用的几种函数基本都在math 模块和cmath 模块里,下面简单介绍下math 模块和cmath 模块。

2、查看math模块的函数内容:dir(math)。

cmath 模块:
1、要使用 cmath模块的函数必须先导入:import cmath。

3、cmath 模块运算的是复数,和math模块不一样。

Python中的数学运算常用的几种函数基本都在math 模块和cmath 模块里,下面简单介绍下math 模块和cmath 模块。
2、查看math模块的函数内容:dir(math)。
cmath 模块:
1、要使用 cmath模块的函数必须先导入:import cmath。
3、cmath 模块运算的是复数,和math模块不一样。