MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / area

Method area

geometry/geometry.py:95–100  ·  view source on GitHub ↗

>>> Ellipse(5, 10).area 157.07963267948966

(self)

Source from the content-addressed store, hash-verified

93
94 @property
95 def area(self) -> float:
96 """
97 >>> Ellipse(5, 10).area
98 157.07963267948966
99 """
100 return math.pi * self.major_radius * self.minor_radius
101
102 @property
103 def perimeter(self) -> float:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected