Editor

Student Grade Summary

Intermediate · Write the code · from NumPy Operations: Element-wise Math, Aggregations, and ufuncs

From the lesson: NumPy Operations: Element-wise Math, Aggregations, and ufuncs

You know how to create NumPy arrays. Now it's time to actually do things with them. The real power of NumPy is that you can perform math on entire arrays at once - no loops required.

Read the lesson

Given grades = np.array([88, 76, 95, 82, 91, 73, 89, 97]), print the following on separate lines:

1. The mean grade

2. The highest grade

3. The index of the lowest grade

import numpy as np
grades = np.array([88, 76, 95, 82, 91, 73, 89, 97])
# Print mean, max, and index of min

More NumPy Operations exercises

All Python exercises · 50 practice problems · Data Science & Machine Learning quiz