WeCodeAcademy

Creating Arrays

Besides np.array(list), NumPy can build arrays for you: zeros, ones, full, arange (like range) and linspace (evenly spaced numbers between two ends).

Examplepython
Open in editor »
Quick check

What does `np.arange(1, 6)` produce?

Your turn: write the code

Print the even numbers from 0 up to (but not including) 10 using arange.

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.