Question: 6. Write a function perimeter (poly) which finds the perimeter of a polygon, where the input argument poly is a list of tuples, each

6. Write a function perimeter (poly) which finds the perimeter of a polygon, where the input argument poly is a list of tuples, each tuple being the (x, y) coordinates of a point on the polygon. The perimeter is the sum of the distances from one point to the next, including the distance from the last point to the first. The distance between (x1, y1) and (x2, y2) is: sqrt( (x2-x1) ** 2 + (y2-y1) ** 2) Try your function on a square, a rectangle, and a triangle, where you know what the answer should be.
Step by Step Solution
There are 3 Steps involved in it
Sure Heres an implementation of the perimeterpoly function in Python python import math def perimete... View full answer
Get step-by-step solutions from verified subject matter experts
