NameError: name 'x_train' is not defined

what is wrong with this , when we are only supposed to write code within the specific space? appreciate any help

You also have to run all the above cells too.

thank you so much, i did many times i even reset the whole document, still doesnt work

Are you running them sequentially, starting from cell 1? Try closing and reopening the assignment again.

Thank you i restarted and is now working by running code step by step. I do however now get the error AssertionError: Case 1: Cost must be 0 for a perfect prediction but got -157.5, which i will try to work on