I have a list of points as such:
a = [(2,4),(34,53),(34,2),(84,64)]
These points are listed in clockwise order, and they form a Polygon. I need to find the perimeter of the polygon, which would be the sum of the distance between adjacent points. I would have to use the distance formula to find the distance, so it would have to be the distance between (2,4) and (34,53), and then the distance between (34,53) and (34,2) and so on.
How would I write this for loop that uses the distance formula for using the points of the 1st element and the 2nd element, and then when moves on to the 2nd and 3rd element and so on, and finally when its at the last element, it uses the distance formula on the last element and the first element.. sort of like a word-wrap?