C3_W1 || UNQ_C1: NameError

I’ve passed all the tests within the jupyter notebook but I keep on getting the following error when submitting the notebook: NameError("name 'X' is not defined")

X is defined properly within the notebook.

Some usual things to check:

Did you restart the kernel of the notebook, then run your code from top to bottom once and only once to make sure X has been defined before it is used?

Was X defined inside a function but used outside? Or the other way around?

Did you define the small letter variable x but use the captial letter variable X?

It seems restarting the kernel fixed the issue. Thanks