-
Notifications
You must be signed in to change notification settings - Fork 3
Circle
Jonathan edited this page Apr 9, 2024
·
1 revision
Represents a circle with a specific radius, plane, and length.
The Circle class defines a circle by its radius, the plane it lies in, and its calculated length (circumference).
- `radius` (float): The radius of the circle.
- `plane` (Plane): The plane in which the circle lies.
- `length` (float): The length (circumference) of the circle. Automatically calculated during initialization.
-
__id__(self)
: Returns the ID of the Circle. -
__str__(self) -> str
: Generates a string representation of the Circle object.
Returns the ID of the Circle.
str
: The ID of the Circle in the format "id:{self.id}".
Generates a string representation of the Circle object.
str
: A string that represents the Circle object.
circle = Circle(radius, plane, length)
print(circle)
# Output: Circle(...)