Question: Exercise 5.2 (statistics107.py). Write the functions listed below. They should that take a list as a parameter and return the following numbers. Use the provided

 Exercise 5.2 (statistics107.py). Write the functions listed below. They should that

Exercise 5.2 (statistics107.py). Write the functions listed below. They should that take a list as a parameter and return the following numbers. Use the provided statistics107py to write and test your functions max(elements) sin(elements) sum (elements) maximum element. minimum element. the sum of every element in the list. Although you may find them useful for testing, do not use the built-in functions max, min, sum. Also, write the following functions that take a list and return a list with the following elements: odds (elements) all odd elements of the input list. evens (elements) all even elements. every other (elements) finds every other element, starting from theoh every_other odd (elements) finds every other element then returns only the odd elements. every_other_even(elements) finds every other element then returns only the even elements. You do not need to accept user input, just write the functions and use the function runtests to check them. Remember you can call your own functions from any part of your program, even from other functions that you write. The goal is to reduce repetition. What's the minimum amount of code you'll have to write? >>> import statistics|07 2statistics107.every_other 1,2,3,4]) 4statistics107.every other_even(1, 100, 45, 23, 10, 2. 4. 13]) 12 CSE/IT 107L Lab 4: Lists and For s [100, 2) statistics107 evens([1,2,3,4]) [2, 4] >>statistics107.sum([1,2,3,4]) to! >>> sun( [1,2,3,4]) # write your own

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!