Question: 1. Write a function get_max() that takes a list of numbers and returns its maximum value. Example: listi w ans = get_max(list1) print (ans)
1. Write a function get_max() that takes a list of numbers and returns its maximum value. Example: listi w ans = get_max(list1) print (ans) Output: 9 [3, 1, 4, 1, 5, 9] 2. Write a function get_unique() that takes a list of numbers and returns the number of unique values and a list containing all unique values. Example: listi [3, 1, 4, 1, 5, 9] n_unique, list_unique = get_unique (list1) print (n_unique) print (list_unique) Output: 5 [1, 3, 4, 5, 9] (The order does not matter)
Step by Step Solution
3.39 Rating (158 Votes )
There are 3 Steps involved in it
Here are the Python functions as per your specifications Function to ge... View full answer
Get step-by-step solutions from verified subject matter experts
