Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

def find_lists_avg(list_of_lists): list_of_avgs = [] if len(list_of_lists) == 0: return None else: for l in list_of_lists: avg = float(sum(l))/len(l) list_of_avgs.append(avg) return list_of_avgs Write a function,

image text in transcribed

def find_lists_avg(list_of_lists): list_of_avgs = [] if len(list_of_lists) == 0: return None else: for l in list_of_lists: avg = float(sum(l))/len(l) list_of_avgs.append(avg)

return list_of_avgs

image text in transcribedimage text in transcribed

Write a function, find lists_avg(...), that computes the average of a list of numbers. The function accept one parameter, list_of_lists, from which you should extract each list and compute the average of the values in each list. You can assume that the values in the list are either integers or floats. The function should return a list of averages of the lists. Ex. list-of-lists [[1,2,3], [2,4], [3,3,3]] print(find_lists_avg(list_of_lists)) should output: [2.0, 3.0, 3.0]

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

1.Which are projected Teaching aids in advance learning system?

Answered: 1 week ago

Question

What are the classifications of Bank?

Answered: 1 week ago