“Python/ref cmath tau”的版本间差异

来自菜鸟教程
跳转至:导航、​搜索
(Pywikibot 4.4.0.dev0)
 
(机器人:添加分类Python基础教程
 
第50行: 第50行:
  
 
<br />
 
<br />
 +
 +
[[分类:Python基础教程]]

2020年10月29日 (四) 08:49的最新版本

<languages />

Python cmath.tau常数

❮cmath方法

打印tau的值:

    #Import cmath Library
import cmath 

#Print the value of tau

    print (cmath.tau)

定义和用法

The cmath.tau 常数返回tau,即6.283185307179586。

定义为圆周与半径之比。Tau是一个圆常数,其值等于2π。

注意: 数学上tau由τ表示。

句法

    cmath.tau
  

技术细节

返回值: A

float 值6.283185307179586,代表数学常数 tau

Python版本: 3.6

❮cmath方法