Question: How do I do this using python? Define the get_funny_average() function which is passed a list of numbers as a parameter and returns the average
How do I do this using python?

Define the get_funny_average() function which is passed a list of numbers as a parameter and returns the average of some of the numbers in the parameter list. The function returns the average of the remaining numbers (rounded to 1 decimal place) after all the following have beeen excluded from the parameter list of numbers (if they exist in the list): .all zeroes, . all negative numbers, the smallest positive number and the largest positive number For example, the following code: print("1. Funny average: ", get_funny_average([ 3, 2, , 25, 1])) print("2. Funny average: ", get_funny_average ([-6, -32, 2, e, -51, 1, , e]) print "3. Funny average: ", get_funny_average([56, 32, 2, 22, 22])) print("4. Funny average: ", get_funny_average(I-56, -3, 0, -21, 0, 0, 5])) print("5. Funny average: ", get_funny_average ([56, 3, 2, 0, 251, 1, 41, 22])) print("6" Funny average: ", get-funny-average ([-56, -3, 2, 0, -251, 1, -41, 0])) print("7. Funny average: ", get_funny_average([)) prints 1. Funny average: 2.5 2. Funny average: e 3. Funny average: 25.3 4. Funny average: e 5. Funny average: 24.8 6. Funny average: 7. Funny average: e
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
