Python math.pi- Konstante
Beispiel
Drucken Sie den Wert von PI:
# Import math Library
import math
# Print the value of pi
print (math.pi)
Definition und Verwendung
Die math.pi
Konstante gibt den Wert von PI zurück: 3,141592653589793.
Hinweis: Mathematisch wird PI durch π dargestellt .
Syntax
math.pi
Technische Details
Rückgabewert: | Ein float Wert, 3,141592653589793, der die mathematische Konstante PI darstellt |
---|---|
Python-Version: | 1.4 |