Question: ) canBeTriangle? / 1 This function will receive a tuple as an argument. It should return true if the elements of this tuple could be

) canBeTriangle?/1 This function will receive a tuple as an argument. It should return true if the elements of this tuple could be the side lengths of a triangle, and false otherwise. This means that if the function receives as input anything other than a 3- tuple, return false. If the function receives a 3-tuple, but the elements are not numeric, return false also. Beyond the above, for example, the numbers 3,4,5 could represent the side lengths of a triangle, but 1,2,5 could not. (To see why this is the case, try and draw a triangle with side lengths 1,2, and 5. Use a ruler.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!