Your First NumPy Lab

Beginner

Introduction

Hi there, welcome to LabEx! In this first lab, you'll learn the classic "Hello, World!" program in NumPy.

Click the Continue button below to start the lab.

Hello NumPy

Let's start by importing the NumPy library. Open a new terminal and type:

python3
Python terminal window open

This will open a Python interpreter. Now, let's import NumPy:

import numpy as np

NumPy is now imported and ready to use. Let's create a NumPy array. We'll start with a simple list of numbers:

a = np.array([10, 20, 30, 40])

We can print the array by typing:

print(a)

Summary

Congratulations! You have completed your first LabEx Lab.

If you want to learn more about LabEx and how to use it, you can visit our Support Center . Or you can watch the video to learn more about LabEx.

Programming is a long journey, but Next Lab is just one click away. Let's do it!