Shape
Abstract base shape.
Usage
Shape()Parameters
color: str = "red"-
Fill color.
Methods
| Name | Description |
|---|---|
| area() | Compute the area of the shape. |
| describe() | Return a human-readable description. |
| perimeter() | Compute the perimeter of the shape. |
area()
Compute the area of the shape.
Usage
area()Returns
float-
Area value.
describe()
Return a human-readable description.
Usage
describe()Returns
str-
Description string.
perimeter()
Compute the perimeter of the shape.
Usage
perimeter()Returns
float-
Perimeter value.