Python cmath.pi Constante
Voorbeeld
Druk de waarde van PI af:
#Import cmath Library
import cmath
# Print the value of pi
print (cmath.pi)
Definitie en gebruik
De cmath.pi
constante retourneert de waarde pi: 3.141592653589793.
Het wordt gedefinieerd als de verhouding van de omtrek tot de diameter van een cirkel.
Opmerking: Mathematisch wordt pi weergegeven door π .
Syntaxis
cmath.pi
Technische details
Winstwaarde: | Een float waarde, 3.141592653589793, die de wiskundige constante PI . voorstelt |
---|---|
Python-versie: | 1.5 |