The purpose of this activity is to practice plottng
data sets and to make histograms using the matplotlib
module in Python.
[73.2, 84.7, 89.5, 92.1, 90.7, 77.6, 95.8, 82.1, 70.4, 69.6, 57.2, 78.9, 91.5, 85.3, 74.3]the list of letter grade counts that would get returned is
[4, 4, 5, 1, 1]because there are 4 A's, 4 B's, 5 C's, 1 D, and 1 F.
import numpy as np
at the beginning of the Code
cell.
grades
in the code below), the following
code will plot a histogram of those grades:
# Creating histogram fig, ax = plt.subplots(figsize =(10, 7)) ax.hist(grades, bins = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) # Show plot plt.show()Copy this code into a new Code cell and run it. Think about whether it looks the way you thought it would/should.