Menu
×
×
Correct!

Exercise:

Insert the correct slicing syntax to print the following selection of the array:

Everything from (including) the third item to (not including) the fifth item.

arr = np.array([10, 15, 20, 25, 30, 35, 40]) print(arr[2:4])
arr = np.array([10, 15, 20, 25, 30, 35, 40]) print(arr[2: 4])
arr = np.array([10, 15, 20, 25, 30, 35, 40]) print(arr[2 : 4])
arr = np.array([10, 15, 20, 25, 30, 35, 40]) print(arr[2 :4])

Not Correct

Click here to try again.

Correct!

Next ❯
arr = np.array([10, 15, 20, 25, 30, 35, 40])

print(arr)

  
  
  




Completed 0 of 23 Exercises:

NUMPY Creating Arrays
NUMPY Indexing Arrays
NUMPY Slicing Arrays
NUMPY Data Types
NUMPY Copy vs View
NUMPY Array Shape
NUMPY Array Join
NUMPY Array Search
NUMPY Array Sort

×

Reset the Score?

This will reset the score of ALL 23 exercises.

Are you sure you want to continue?



×

Congratulations!

You have finished all 23 NUMPY exercises.

Share your score: