0% found this document useful (0 votes)
2 views

Lab 0 - Getting Started with Jupyter Notebook

This document provides a guide for getting started with Jupyter Notebook using the Anaconda distribution. It outlines the installation process, how to launch and navigate the Jupyter Notebook interface, and basic operations such as creating and executing Python code. Additional tips and resources for further exploration are also included.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lab 0 - Getting Started with Jupyter Notebook

This document provides a guide for getting started with Jupyter Notebook using the Anaconda distribution. It outlines the installation process, how to launch and navigate the Jupyter Notebook interface, and basic operations such as creating and executing Python code. Additional tips and resources for further exploration are also included.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

COMP2024 Spring 2025

Lab 00: Getting Started with Jupyter Notebook

1. Introduction
Jupyter Notebook is an interactive web-based environment for writing and executing
code, visualizing data, and creating rich, interactive documents. This lab will guide you
through the process of setting up your environment using the Anaconda distribution,
which includes Jupyter Notebook and many other useful libraries for data science. You
will learn how to navigate the Jupyter Notebook interface, create and execute Python
code, and explore some basic features.

2. Objective:
• To install the Anaconda distribution.
• To launch and navigate the Jupyter Notebook environment.
• To create and execute a simple Python code in a Jupyter Notebook.

3. Getting Started with Jupyter Notebook

• Install Anaconda:
• Download:
o Visit the official Anaconda website
(https://www.anaconda.com/download) and download the
appropriate installer for your operating system (Windows, macOS, or
Linux).
• Installation:
o Follow the on-screen instructions during the installation process.
 Important:
 Check the box to add Anaconda to your system's PATH
environment variable. This allows you to easily launch
Jupyter Notebook from your terminal/command prompt.

• Launch Jupyter Notebook:


• Open Terminal/Command Prompt:
o On Windows: Search for "cmd" in the Start menu.
o On macOS/Linux: Open the Terminal application.
• Type jupyter notebook and press Enter.
• This will open Jupyter Notebook in your default web browser.

• Navigate the Jupyter Notebook Interface:


• File Browser: The main interface displays a file browser showing the
current directory.
• New Notebook:
o Click "New" and select "Python 3" to create a new Python notebook.
• Notebook Cells:

Prepared by Simon Lau Boung Yew Page 1 of 3


COMP2024 Spring 2025

o A notebook consists of cells.


 Code cells: For writing and executing Python code.
 Markdown cells: For writing text, headings, and formatting
(using Markdown syntax).

• Create and Execute Python Code:


• Enter Code:
o In a code cell, type the following code:

print("Hello, World!")

• Run Cell:
o Click the "Run" button (or press Shift+Enter) to execute the code. The
output will appear below the cell.

• Explore Basic Notebook Features:


• Create new cells: Insert cells above or below the current cell using the
"Insert" menu or keyboard shortcuts.
• Change cell type: Convert between code and Markdown cells.
• Edit cells: Edit the content of cells.
• Save Notebook: Save your notebook using the "File" menu.
• Kernel: Interact with the Python kernel (e.g., restart, interrupt).

• Experiment:
• Try writing and executing different Python code snippets.
• Experiment with Markdown cells to format your notebook (headings, lists,
images, etc.).
• Explore the Jupyter Notebook documentation for more advanced features.

• Additional Tips:
• Keyboard Shortcuts: Learn and use keyboard shortcuts for faster
navigation and cell operations.
• Magic Commands: Jupyter Notebooks support "magic commands" that
provide extra functionality (e.g., %timeit to measure execution time).
• Extensions: Install and use Jupyter Notebook extensions to enhance the
user interface and add new features.

Additional Resources
• Anaconda Documentation: https://docs.anaconda.com/anaconda/
• Jupyter Notebook Documentation: https://docs.jupyter.org/

Prepared by Simon Lau Boung Yew Page 2 of 3


COMP2024 Spring 2025

Note: This is a basic introduction. Explore the Jupyter Notebook and Anaconda
Navigator interface and experiment with different features to gain a deeper
understanding of its capabilities.

Prepared by Simon Lau Boung Yew Page 3 of 3

You might also like