Question: Question 5 : SecondHighest (4 points) Write a function secondHighest that takes a tuple of integers and finds the second largest number in the tuple.

 Question 5 : SecondHighest (4 points) Write a function secondHighest that

Question 5 : SecondHighest (4 points) Write a function secondHighest that takes a tuple of integers and finds the second largest number in the tuple. The function takes in a tuple of integers as input. If there are multiple instances of the highest number in the tuple (such as in the tuple (1,3,4,9,5,9), where 9 is repeated), the second highest number is not 9, even though there are two nines. The second highest number in this tuple is 5. If the tuple is empty return false ]: def secondMax (data): return # YOUR CODE HERE raise NotImplementedError() ]: print("Test Case 1 : print("Test Case 2 : print("Test Case 3: secondMax((1,2)) == 1) secondMax((1,3,4,9,5,9)) == 5) abs (secondMax((9.1,2.6,2.9,5.8,3.0,1.4,8.2)) - 9.1)

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 Databases Questions!