Python math.pi Stała
Przykład
Wydrukuj wartość PI:
# Import math Library
import math
# Print the value of pi
print (math.pi)
Definicja i użycie
Stała math.pi
zwraca wartość PI: 3.141592653589793.
Uwaga: Matematycznie PI jest reprezentowane przez π .
Składnia
math.pi
Szczegóły techniczne
Wartość zwrotu: | Wartość float 3.141592653589793, reprezentująca stałą matematyczną PI |
---|---|
Wersja Pythona: | 1,4 |