Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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.5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions