Jupyter Notebook is a web application for creating and sharing documents that contain live code, equations, visualizations and explanatory text.
There are two main types of cells: code cells and markdown cells. Hit
SHIFT+ENTER to execute the contents of a cell.
Markdown cells contain:
- plain text
- Anything that a browser can understand
Python code is written in code cells. Hit
SHIFT+ENTER to execute the code. Output is displayed below the code cell:
# Python code to display the first 10 square numbers for n in range(1,11): print(n**2)
1 4 9 16 25 36 49 64 81 100
There are two modes: edit mode and command mode. Press
ESC to enter command mode and
ENTER for edit mode.
Edit mode is for writing text and code in the cell.
Command mode is for notebook editing commands such as cut cell, paste cell, and insert cell above.
The toolbar has buttons for common actions however you can increase the speed of your workflow by memorizing the following keyboard shortcuts in command mode:
|Command Mode Action||Shortcut|
|insert empty cell above||
|insert empty cell below||
|paste cell below||
|switch to code cell||
|switch to markdown cell||
|save and checkpoint||
See Help in the toolbar of the Jupyter notebook to see the list of keyboard shortcuts.