Write a function that takes the coordinates of three points and returns the perimeter of the triangle. The given points are the vertices of a triangle on a two-dimensional plane.
perimeter(arr[0]={15, 7}, arr[1]={5, 22}, arr[2]={11, 1}) ➞ 47.08
perimeter(arr[0]={0, 0}, arr[1]={0, 1}, arr[2]={1, 0}) ➞ 3.41
perimeter(arr[0]={-10, -10}, arr[1]={10, 10}, arr[2]={-10, 10}) ➞ 68.28Check my profile for other challenges in this series.