input: Write a python function to calculate the area of a polygon given its side lengths.
  assert abs(polygon_area([3, 4, 5]) - 6.0) < 1e-6
  assert abs(polygon_area([7, 8, 9, 10]) - 127.27922061357856) < 1e-6
  assert abs(polygon_area([2, 3, 4, 5, 6]) - 11.61895003862225) < 1e-6
output: def polygon_area(sides):
      import math
      n = len(sides)
      if n < 3:
          return 0
  
      s = sum(sides) / 2
      product = s
      for side in sides:
          product *= (s - side)
      
      area = math.sqrt(product)
      return area