← All topics
Quiz: NumPy: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What does marks.argmax() return?
- Q2. For a 3×3 array of student scores (rows = students), which gives each student's average?
- Q3. What does arr[arr 50] do?
- Q4. Why are NumPy arrays faster than Python lists for maths?
- Q5. What is broadcasting?
- Q6. What does this print? (code)
- Q7. What does this print? (code)
- Q8. You change b = a[0:2] and then set b[0] = 99. What happens to a?
- Q9. Why does a NumPy array require all elements to share one dtype?
- Q10. Why create random numbers with np.random.defaultrng(42)?