W2_A1_Ex-1_NameError: name ‘train_set_x_orig’ is not defined

The problem is that you have accidentally converted the cell for backward_propagation from a code cell into a “markdown” or documentation cell, so that there is no function there. There is a way in the UI to convert a cell from code to markdown and markdown to code (Cell -> Cell Type), but if you can’t figure out how to do that, the other good strategy is just to get a clean copy of the notebook and “copy/paste” over your completed work. There is a topic about that on the DLS FAQ Thread.