Python cmath.pi Constante
Exemple
Imprimer la valeur de PI :
#Import cmath Library
import cmath
# Print the value of pi
print (cmath.pi)
Définition et utilisation
La cmath.pi
constante renvoie la valeur pi : 3,141592653589793.
Il est défini comme le rapport de la circonférence au diamètre d'un cercle.
Remarque : Mathématiquement, pi est représenté par π .
Syntaxe
cmath.pi
Détails techniques
Valeur de retour : | Une float valeur, 3,141592653589793, représentant la constante mathématique PI |
---|---|
Version Python : | 1.5 |