Supervised ML: Regression and Classification week 2 pratice lab

Hello I don’t know why am I getting this error though this is not editable and only need to check if my implementation was correct by running the following test code :
NameError Traceback (most recent call last)
3 initial_b = 1
----> 5 cost = compute_cost(x_train, y_train, initial_w, initial_b)
6 print(type(cost))
7 print(f’Cost at initial w: {cost:.3f}')

NameError: name ‘x_train’ is not defined

This could mean there is an error in your compute_cost() function. That’s what the cell you can’t edit does - it tests the function you worked on.

Hint: The function is defined to use the variable x, not x_train.

Also, be sure that every time you open the notebook, you run all of the cells starting from the top. That’s how the resources are imported and the data set is created.

@TMosh thank you it worked.