← Quiz: NumPy: all 10 questions
Quiz: NumPy · Question 2 of 10
For a 3×3 array of student scores (rows = students), which gives each student's average?
For a 3×3 array of student scores (rows = students), which gives each student's average?
- A.scores.mean(axis=0)
- B.scores.mean(axis=1)
- C.scores.mean()
- D.scores.sum(axis=0)
Answer & explanation
Correct answer: scores.mean(axis=1)
axis=1 works across each row.
Can you get the rest right without peeking?
Take the timed Quiz: NumPy quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →