Python cmath.pi Konstante
Beispiel
Drucken Sie den Wert von PI:
#Import cmath Library
import cmath
# Print the value of pi
print (cmath.pi)
Definition und Verwendung
Die cmath.pi
Konstante gibt den Wert pi zurück: 3,141592653589793.
Sie ist definiert als das Verhältnis des Umfangs zum Durchmesser eines Kreises.
Hinweis: Mathematisch wird pi durch π dargestellt .
Syntax
cmath.pi
Technische Details
Rückgabewert: | Ein float Wert, 3,141592653589793, der die mathematische Konstante PI darstellt |
---|---|
Python-Version: | 1.5 |