Question: Exercise 7 Step 1: Create a new editor window and save it. Use labbex7.py as the file name. Step 2: The centered average of a

Exercise 7 Step 1: Create a new editor window and save it. Use labbex7.py as the file name. Step 2: The centered average of a list of numbers is the arithmetic mean of all the numbers in the list, except for the smallest and largest values. If the list has multiple copies of the smallest or largest values, only one copy is ignored when calculating the mean. For example, given the list [1, 1, 5, 5, 10, 8, 7], one 1 and the 10 are ignored, and the centered average is the mean of the remaining values; that is, (1 + 5 + 5 + 8 + 7)/5 = 5.2. Use the function design recipe to develop a function named centered_average. The function takes a list of integers. Assume that the list has at least three integers. The function returns the centered average of the list. Your function can call Python's min and max functions, but it is not permitted to call Python's sum function. Your function must have exactly one loop. Your function definition must have type annotations and a complete docstring. Use the Python shell to test your function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
