Welcome to JupyterLab¶
In this activity, you will get hands-on experience with the basics of JupyterLab. By the end of this notebook, you will be able to:
+-
+
- Create and run code cells. +
- Use Markdown cells for adding text. +
- Explore JupyterLab's interface and shortcuts. +
- Save and export your notebooks. +
Let’s get started!
+# This is a Python code cell
+print('Hello, Afroz!')
+Hello, Afroz! ++
Task¶
-
+
- Modify the code above to print your name. +
- Run the cell again to see the output. +
3. JupyterLab Interface¶
The JupyterLab interface includes several useful components:
+-
+
- File Browser: Navigate and manage files. +
- Notebook Tabs: Work with multiple notebooks or files. +
- Toolbar: Run cells, save notebooks, and more. +
Activity¶
Explore the interface and try the following:
+-
+
- Locate the File Browser on the left-hand side. +
- Open a new Python 3 notebook (File > New > Notebook). +
- Close this new notebook without saving it. +
4. Keyboard Shortcuts¶
Keyboard shortcuts make working in JupyterLab more efficient. Here are some commonly used ones:
+-
+
- Shift + Enter: Run the current cell. +
- A: Insert a new cell above. +
- B: Insert a new cell below. +
- DD: Delete the current cell. +
- M: Convert a cell to Markdown. +
- Y: Convert a cell to code. +
Activity¶
-
+
- Practice these shortcuts by inserting a new cell below. +
- Change the cell type to Markdown and add a heading:
# JupyterLab Shortcuts.
+ - Run the cell to render it. +
5. Saving and Exporting Notebooks¶
You can save your notebook using Ctrl + S or the save icon in the toolbar.
+Notebooks can also be exported to other formats like HTML or PDF:
+-
+
- Go to File > Export Notebook As. +
- Choose a format (e.g., HTML). +
Activity¶
Save this notebook and export it as an HTML file. Verify that the file is created in the File Browser.
+Congratulations!¶
You have completed the basics of JupyterLab.
+In the next activity, we will explore Python Matplotlib libraries.
+Feel free to experiment with JupyterLab further to familiarize yourself with its features.
+