Question: Define the get_funny_average0 function which is passed a list of numbers as a parameter and returns the average of some of the numbers numbers (rounded

 Define the get_funny_average0 function which is passed a list of numbersas a parameter and returns the average of some of the numbersnumbers (rounded to 1 decimal place) after all the following have beeen

Define the get_funny_average0 function which is passed a list of numbers as a parameter and returns the average of some of the numbers 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) in the parameter list. The function returns the average of the remaining . 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_averageCD 3, 2, 0, 25, 1])) print("2. Funny average: ", get_funny_averageCL-6, -32, 2, 0, -51, 1, 0, 0])) print("3. Funny average: ", get_funny_average(L56, 32, 2, 22, 22])) print("4. Funny average: ", get_funny_average(L-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_averageCL-56, -3, 2, 0, -251, 1, -41, 0])) print("7. Funny average: ", get_funny_average(O) prints: 1. Funny average: 2.5 2. Funny average: 3. Funny average: 4. Funny average: 5. Funny average: 6. Funny average: 7. Funny average: 25.3 24.8 Answer: (penalty regime: 0 %) 1def get_funny_average(numbers): positiveNumbers C] for number in numbers: if number> 0: 6 7 positiveNumbers.append(number) positiveNumbers.sortO Define the get_funny_average0 function which is passed a list of numbers as a parameter and returns the average of some of the numbers 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) in the parameter list. The function returns the average of the remaining . 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_averageCD 3, 2, 0, 25, 1])) print("2. Funny average: ", get_funny_averageCL-6, -32, 2, 0, -51, 1, 0, 0])) print("3. Funny average: ", get_funny_average(L56, 32, 2, 22, 22])) print("4. Funny average: ", get_funny_average(L-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_averageCL-56, -3, 2, 0, -251, 1, -41, 0])) print("7. Funny average: ", get_funny_average(O) prints: 1. Funny average: 2.5 2. Funny average: 3. Funny average: 4. Funny average: 5. Funny average: 6. Funny average: 7. Funny average: 25.3 24.8 Answer: (penalty regime: 0 %) 1def get_funny_average(numbers): positiveNumbers C] for number in numbers: if number> 0: 6 7 positiveNumbers.append(number) positiveNumbers.sortO

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!