Creating a JupyterLab Project
In this activity, you will create a project in JupyterLab and execute a Python hello world print statement in a Jupyter Notebook.

Background
Congratulations! You’ve been hired by a large financial investment analytics firm, and today is your first day. Your manager has asked you to test out the status of the newly installed JupyterLab environment to ensure its functionality.
In order to test that the environment is working as expected, create a project in JupyterLab and execute a Python hello world print statement in a Jupyter Notebook.
Instructions
Running Code from a Notebook
Using JupyterLab, complete the following steps:
- Create a folder called
Jupyter-Workspace. - Navigate to the
Jupyter-Workspacefolder. - Create a Python Jupyter Notebook.
- Type the following line of code into a cell in the notebook and execute the code in that cell by clicking the run buttong (or ‘Shift + Enter’)
print("Hello World!") - Now type this in a new cell in the same notebook and execute the code in that cell by clicking the run button (or ‘Shift + Enter’)
print("Hello World from a new cell")
hello_world.ipynb
# print a statement: 'Hello World!'
# print a statement: 'Hello World from a new cell'
Answer
In [1]:
# print a statement: 'Hello World!'
print('Hello World!')
Out [1]:
Hello World!
In [2]:
# print a statement: 'Hello World from a new cell'
print('Hello World from a new cell')
Out [2]:
Hello World from a new cell
Running Code from a .py file
- Next, using JupyterLab, create a traditional Python file with the ‘.py’ ending and name it ‘hello_world.py’
- In this ‘.py’ file create the same print statements as above.
- Make sure you are in the same directory as this file, then open a terminal window using the launcher and execute the ‘.py’ file by running:
python hello_world.py
hello_world.py
# print a statement: 'Hello World!'
# print a statement: 'Hello World from a new cell'
Answer
# print a statement: 'Hello World!'
print('Hello World!')
# print a statement: 'Hello World from a new cell'
print('Hello World from a new cell')
Hint
If you need help working in the JupyterLab environment, read the documentation to learn more.