Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a function called avg_max that takes a list of lists (sublists may be empty) and return the average of the largest item in each
Write a function called avg_max that takes a list of lists (sublists may be empty) and return the average of the largest item in each sublist as a float. If a sublist is empty, do not consider it for the purposes of computing average. You may assume that everything inside a non-empty sublist is a number. You may assume that at least one sublist will be non-empty.
Write a function called avg max that takes a list of lists (sublists may be empty) and return the average of the largest item in each sublist as a float. If a sublist is empty, do not consider it for the purposes of computing average. You may assume that everything inside a non-empty sublist is a number. You may assume that at least one sublist will be non-empty. For example: Result Test print (avg_max (I1,2,31,141,1)) print (avg_max (II1,2,3],14,[8,1,5.0]])) 5.0 print (avg_max(I0])) 3.5Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started