Question: Using Python Implement function avg_val(lst), which returns the average value of the elements in the list. For example, given a list lst: [19, 2, 20,
Using Python Implement function avg_val(lst), which returns the average value of the elements in the list. For example, given a list lst: [19, 2, 20, 1, 0, 18], the function should return 10. The name of the method should be avg_val and the method should take one parameter which is the list of values to test. Here is an example call to the function print(avg_val([19, 2, 20, 1, 0, 18])) File Name avgoflst.py
Note: You do not need any other code in the main method or any print statements. ONLY the avg_val method is required. Otherwise, the autograder will fail and be unable to grade your code. (I.e., do not include the above example in your code.) The above example should be used to test your code but deleted or commented out upon submission.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
