Week two practice programming assignment

I keep getting “np not defined” error message as well as “nameError” message when I try to complete both the normalizing rows and image2vector exercises

You have to run all of the cells from the start of the notebook before you can do any work. That’s where the numpy package is imported and ‘np’ is created.

Thanks. So I just go to the “Cell” tab and click on “run all”?

I was getting this error when I kept too many of the “None” statements in the code. Basically re-setting variables not at the right point in the code.

Yes (padding to at least 20 characters)

You have to replace all of the None statements with real code, because “None” will break the python parser, it causes syntax or runtime errors.

You can’t submit a partially completed notebook for grading.