Learn how to use interactive notebooks for developing in Python.
Repository · Notebook
- Click on this link to open the accompanying notebook for this lesson or create a blank one on Google Colab.
- Sign into your Google account to start using the notebook. If you don't want to save your work, you can skip the steps below. If you do not have access to Google, you can follow along using Jupyter Lab.
- If you do want to save your work, click the COPY TO DRIVE button on the toolbar. This will open a new notebook in a new tab. Rename this new notebook by removing the words Copy of from the title (change
Copy of 01_Notebooksto
Types of cells
Notebooks are made up of cells. There are two types of cells:
code cell: used for writing and executing code.
text cell: used for writing text, HTML, Markdown, etc.
Click on a desired location in the notebook and create the cell by clicking on the
➕ TEXT (located in the top left corner).
Once you create the cell, click on it and type the following text inside it:
Run a cell
Once you type inside the cell, press the
RETURN (enter key) together to run the cell.
Edit a cell
To edit a cell, double click on it and make any changes.
Move a cell
Move a cell up and down by clicking on the cell and then pressing the ⬆ and ⬇ button on the top right of the cell.
Delete a cell
Delete the cell by clicking on it and pressing the trash can button 🗑️ on the top right corner of the cell. Alternatively, you can also press ⌘/Ctrl + M + D.
Repeat the steps above to create and edit a code cell. You can create a code cell by clicking on the
➕ CODE (located in the top left corner).
Once you've created the code cell, double click on it, type the following inside it and then press Shift + Enter to execute the code.
These are the basic concepts we'll need to use these notebooks but we'll learn few more tricks in subsequent lessons.
To cite this lesson, please use:
1 2 3 4 5 6