Test yourself

NumPy Quiz

Answer the 12 questions below — you get instant feedback on each. Your best score is saved on this device.

1What is the main object in NumPy?

2How is NumPy usually imported?

3What does an array's .shape tell you?

4What does a[a > 5] return?

5Applying an operation to a whole array at once is called:

6How do you create an array from a Python list?

7What does np.zeros(3) create?

8NumPy array indexing starts at:

9Which method changes an array's shape without changing its data?

10What does a.mean() return?

11What does broadcasting let you do?

12Which returns the largest value in array a?

◀ Back to lessons