Skip to content

Geometry (geo.py)

The Geometry module in NumLex provides essential geometric functions for calculating areas of common shapes.

Functions

  • area_triangle(base, height): Calculates the area of a triangle.

    area = area_triangle(base=10, height=5)
  • area_circle(radius): Calculates the area of a circle.

    area = area_circle(radius=7)
  • area_rectangle(length, width): Calculates the area of a rectangle.

    area = area_rectangle(length=8, width=4)
  • area_square(side): Calculates the area of a square.

    area = area_square(side=5)