|
triangle
|
triangle(x, h), triangle(a, b, c)
Implémentation d'un triangle.
Un triangle est définit par sa base et sa hauteur ou par ses trois cotés.
Attributs disponibles - triangle(x, h) :
-
longeur (base)
-
x
-
hauteur
-
h
-
surface
-
surface, s
Attributs disponibles - triangle(a, b, c) :
-
cotés
-
a, b, c
-
périmètre
-
perimeter, p
-
surface
-
surface, s
-
rayon du cercle inscrit
-
ri
-
rayon du cercle circonscrit
-
rc
Exemples
-
triangle(10,5)
-
{'base': 10,
'hauteur': 5,
'surface': 25.0}
-
triangle(2,3,4)
-
{'a': 2,
'b': 3,
'c': 4,
'perimetre': 9,
'rayon cercle circonscrit': 2.0655911179772892,
'rayon cercle inscrit': 0.6454972243679028,
'surface': 2.9047375096555625}
SciCalc