Jupyter notebook¶

The Jupyter notebook is a very popular tool which provides an environent to execute python code as well as view the output of the code and any kind of visulization plot etc. in a single document. Jupyter is provided with Anaconda Python distribution.
The name Jupyter is an acronym which stands for the three languages it was designed for: JUlia , PYThon, and R.
Once jupyter is lauched (can be found from in the start menu) it opens in your browser with url http://localhost:8888/tree

This is the main dashboard view of jupyter Notebook. You can navigate through your computer’s folders from here.
To launch a new notebook, from the selected folder, click the new button in the upper right hand corner and select Python 3.

By deafult each notebook is named “Untitled”, the notebook name can be renamed by clicking on “Untitled” and entering a more descriptive title. Jupyter notebooks are saved as .ipynb files, but can be converted to html, pdf etc.

The cell is the place where you can write your executable code or text using markdown formatting.
In a code cell i typed print('Hello World!') and clicked Run button or Shift-Enter.
[1]:
print('Hello World!')
Hello World!
When a cell is run, its output will be displayed below and the label to its left will have changed from In [ ] to In [1]. The output of a code cell also forms part of the document, which is why it is visible in this tutorial.
There are two modes of operation in jupyter, Command & Edit, Esc and Enter can be used to change operation mode.
Command mode:
The blue color sign denotes that you are in command mode.

In this mode it is possible to:
- Insert a cell above or below - A for Above , B for Below
- Convert a cell into Code cell or Markdown cell - M for Markdown cell and Y for Code cell
- Use Up and Down keys to scroll through cells
- Two times D (D+D) will delete the active cell.
- Undo delete action by Z
Edit mode:
The green color sign denotes edit mode.

In this mode code can be executed. Additionally, the following operations are possible:
- Ctrl-M: enter command mode
- Tab: code completion or indent
- Shift-Tab: tooltip for objects and functions
- Esc: enter command mode
- Shift-Enter: run cell, select below
- Ctrl-Enter: run selected cells
- Alt-Enter: run cell and insert below
All these actions can be accessed the menu as well as via shortcuts described above.
Cells can be Code cells or Markdown cells. Markdown cells can be used to put heading or notes in the notebook. This feature allows for organized and logical explanations within the code. Also, equations in LaTeX format and figures are supported.

This is where you set a cell as markdown, or using the shortcut M when in command mode.
For additional information on Jupyter, see the documentation