Hi !

I receive this (in jupyter notebook) :

‘NameError: name ‘calculate_all_error’ is not defined’

when I run that code :

```
for index in range(len(datapoints)) :
point = datapoints[index]
calculate_all_error(m, b, point)
all_error.append(distance)
for i in range(len(all_error)):
sum_all_error = sum_all_error + all_error[i]
return sum_all_error
```

In the block above, I have my function and it seems to work (according to the results I get)

```
def calculate_error(m, b, point):
x_point = point[0]
y_point = point[1]
difference = get_y(m,b, x_point) - y_point
distance = abs(difference)
return distance
```

and I don’t understand what I have to change…

Thanks for your help !