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