Pythoncmath.pi定数_
例
PIの値を出力します。
#Import cmath Library
import cmath
# Print the value of pi
print (cmath.pi)
定義と使用法
定数はcmath.pi
値pi:3.141592653589793を返します。
これは、円の直径に対する円周の比率として定義されます。
注:数学的には、円周率はπで表されます。
構文
cmath.pi
技術的な詳細
戻り値: | float 数学定数PIを表す値3.141592653589793 |
---|---|
Pythonバージョン: | 1.5 |