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

Method perimeter

geometry/geometry.py:103–108  ·  view source on GitHub ↗

>>> Ellipse(5, 10).perimeter 47.12388980384689

(self)

Source from the content-addressed store, hash-verified

101
102 @property
103 def perimeter(self) -> float:
104 """
105 >>> Ellipse(5, 10).perimeter
106 47.12388980384689
107 """
108 return math.pi * (self.major_radius + self.minor_radius)
109
110
111class Circle(Ellipse):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected