Question: Write a function called triangle_perimeter.. It is passed 3 parameters, all of which are tuples of length 2. It returns the perimeter of the triangle
Write a function called triangle_perimeter.. It is passed 3 parameters, all of which are tuples of length 2. It returns the perimeter of the triangle defined by the 3 points represented by the 2-tuples. For example:
>>> triangle_perimeter((1, 1), (1, 2), (2, 1))
# 1 + 2 + 1 3.414213562373095 >>> triangle_perimeter((0,0), (3, 4), (3,0)) # 5+4+3 12.0
python 2.7.13
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
