- Circle: S = πR²
- Rectangle: S = ab
- Square: S = a²
- Circle: P = 2πR
- Rectangle: P = 2a + 2b
- Square: P = 4a
geometriclib - библиотека для работы с площадью и периметром квадратов и кругов в проектах на python.
'''bash cd project/path/ git clone git clone https://github.com/smartiqaorg/geometric_lib git '''
'''py import geometric_lib.circle as circle, geometric_lib.square as square
print (circle.perimeter(10)) # 62.83184 print (square.area(10)) # 100 '''
'''py circle.area(r) # Площадь круга с радиусом r coin_area = circle.area(5) # 78.54
circle.perimeter(r) # Периметр круга (окружности) с радиусом r coin_perimeter = circle.perimeter(5) # 31.42
square.area(a) # Площадь квадрата со строной а tile_area = square.area(3) # 9
square.perimeter(a) # Периметр квадрата со стороной а tile_perimeter = square.perimeter(8) # 32
Проект включает comprehensive unit-тесты для всех математических функций.
# Запуск тестов для конкретного модуля
python -m unittest test_rectangle.py -v
python -m unittest test_triangle.py -v
python -m unittest test_circle.py -v
python -m unittest test_square.py -v98d9c16 (HEAD -> main, origin/main) FIXED correct imports in test files to resolve module loading
bd0cc86 Add testing instructions and project documentation
e383937 Add unit tests for all geometry modules
bceafa9 Add basic geometry functions
7ab3091 (HEAD -> main) Added new file square.py
c43b580 Added new file circle.py