Pitfalls when working with Jupyter notebooks#
You can execute the same cell in Jupyter notebooks multiple times. This may lead to notebooks which make no sense to the reader.
a = 5
b = 5
a = a + 1
a + b
14
You can execute them in the wrong order or overwrite variables, which leads to the same effect.
d = 5
d = 10
d
5
You can see that cells were executed in the wrong order, repeatedly or not subsequently, by reading the number [?]
left to the cell.
Tip: When your notebook is ready, click on menu Kernel > Restart & Run all
to make sure all cells in the notebook are executed in the right order.