Introduction: The basics of Notebook

You can write standard Python:

Two modes

Command Mode and Edit Mode

"Return" and "Esc" to switch between Command and Edit modes

To Execute : "Shift Return"

To return to Edit mode : "Return/double click"

hide long cell output double click

Two (main) cell types

In a different type of cell, you can:

So you can add comments to your code explaining that, to calculate your cycling speed, you must make use of the fact that

$[x,p_x]=i \hbar$.

Some basic operations and keystrokes:

Toggling toolbars.

The different types of Return:

Choosing cell type:

Use ! to use shell comman right inside notebook

Sharing your notebooks

You can just send people the .ipynb files; they'll contain your input and (optionally) your output.

Other ways to view and run:


Understanding the kernel setting

The running Python environment is determined by the kernel setting of your notebook and not, for example, by the virtualenv you happen to be in.

Here's where your shell environment will find python, pip etc:

That's often the Python that's running the notebook server.

And here's the Python running this notebook, defined by the choice of kernel:

And lastly...

Close and Halt