Here is a guide on how to submit properly formatted .ipynb files for homework and exams.

This is important because a common way to detect bugs that the autograder might find is to first restart the kernel and run everything. Moreover, it is the equivalent of ensuring that you are submitting a polished notebook.

Steps to restart the kernel and run all

Go to the button labeled “Kernel” at the top of the page.

Click on the “Kernel” button to open this dropdown menu. Now click “Restart & Run All.”

This box will then appear. Click the red button labeled “Restart and Run All Cells.”

How to confirm it is correctly formatted

After following the steps above, your notebook cells’ “In [#] ” labels will be in numerical order. Make sure to confirm that all code cells are run. This is a properly formatted .ipynb file. 


Example of an incorrectly formatted notebook

Although this .ipynb file below is in numerical order, the first cell in the file does not start with “In [1]” and is deemed an improperly formatted .ipynb file.