i am trying to find the perimeter of 10 point polygon with given coordinates.
This is what ive got so far
however keep getting an error
poly = [[31,52],[33,56],[39,53],[41,53],[42,53],[43,52],[44,51],[45,51]]
x=row[0]
y=row[1]
``def perimeter(poly):
"""A sequence of (x,y) numeric coordinates pairs """
return abs(sum(math.hypot(x0-x1,y0-y1) for ((x0, y0), (x1, y1)) in segments(poly)))
print perimeter(poly)