Question: Write a function called largest that takes a list of integers as argument, it recursively returns the largest integer of the list. Here are few
Write a function called largest that takes a list of integers as argument, it recursively returns the largest integer of the list. Here are few sample runs: >>> largest([1, 12, 4, 10]) 12 >>> Largest(II) Traceback (most recent call last): File print (Largest ()) File raise Value Error ("Please provide a non empty list") Value Error: Please empty list Largest >>>Largest ([1, 2.2]) Traceback(most recent call last): File xxxx print (Largest([1, 2.2])) File xxxx raise TypeError("the passed argument is not an array") TypeError: the passed argument is not an array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
