I have to do the following :

> 
> A function eval\_f(f, xs) which takes a function f = f(x) and a list xs of values that should be used as arguments for f. The function eval\_f should apply the function f subsequently to every value x in xs, and return a list fs of function values. I.e. for an input argument xs=[x0, x1, x2,..., xn] the function eval\_f(f, xs) should return [f(x0), f(x1), f(x2), ..., f(xn)].
> 
> 
> 

```
import math

def eval_f(f, xs):

    x = []
    f = f(x)
    for i in range(len(xs)):
        f.append(f(x[i]))
    return f

```

eval\_f(math.sqrt, [1, 2, 4, 9])
Traceback (most recent call last):

File "", line 1, in 
 eval\_f(math.sqrt, [1, 2, 4, 9])

File "C:/Users/Idoia/untitled2.py", line 6, in eval\_f
 f = f(x)

TypeError: a float is required