Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

By 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

image text in transcribed

By 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, 0, 25, 11)) print("2. Funny average:" get_funny_ average ([-6, -32, 2, 0, -51, 1, 0, print("3. Funny average: ", get funny_ average ([56, 32, 2, 22, 22])) print("4. Funny average:" get_funny_ average ([-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, print("7. Funny average: ", get funny_average ([1)) prints: 1. Funny average: 2.5 2. Funny average: 0 3. Funny average: 25.3 4. Funny average: 0 5. Funny average: 24.8 6. Funny average: 0 7. Funny average: 0 def get funny averaqe (numbers): return 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_2

Step: 3

blur-text-image_3

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

Build It For The Real World A Database Workbook

Authors: Wilson, Susan, Hoferek, Mary J.

1st Edition

0073197599, 9780073197593

More Books

Students also viewed these Databases questions