Functions¶
Functions are separated by shape and calculation. To see an example of them in action checkout Examples.
Square¶
-
shapes.square.area.
area_square
(length)¶ Calculates the area of a square.
\[area = length^2\]Parameters: length (float like) – length of one side of a square Returns: area – area of the square Return type: float
-
shapes.square.perimeter.
perimeter_square
(length)¶ - \[perimeter = 4 * length\]
Parameters: length (float) – length of one side of a square Returns: perimeter – perimeter of the square Return type: float