mbtask package

base

class BaseFigure(shape: dict[str, float])[source]

Bases: ABC

Abc class for figures

abstract area() float[source]
class Circle(shape: dict[str, float])[source]

Bases: BaseFigure

Circle figure

In the shape arg, which should be a dictionary, add the key “radius” and a positive float value.

area() float[source]

Area o circle

Returns:

area

Return type:

float

class Triangle(shape: dict[str, float])[source]

Bases: BaseFigure

Triangle figure

In the shape arg, which should be a dictionary, add the keys with names of sides of triangle and a positive float values.

area() float[source]

Area of triangle

Returns:

area

Return type:

float

is_right() bool[source]

Is triangle right side

Returns:

bool