Question: Python exercise 1 : def mylinear(x): y = 2*x + 5 return y (a) Write a function that takes a list and a function as
Python

exercise 1 :
def mylinear(x):
y = 2*x + 5
return y
(a) Write a function that takes a list and a function as its arguments. The function should evaluate the passed function on the first entry, second-to-last entry, maximum, and minimum of the list. Remember to return the results. List comprehension might be useful. (b) Call your function on testlist2 = [-7, -1, -12, 0, 2, 5, 7, 8] and use the linear function you wrote in Exercise 1 as the function argument
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
