Correct the code

Report a typo

Your friend wants to create a histogram that shows how old the students in the high school orchestra are. Here's the dataset:

data = [15, 19, 18, 17, 16, 18, 18, 14, 17, 18, 20]

They want the data to be grouped into three ranges: from 14 to 16, from 16 to 18, and from 18 to 20. Your friend has written the following code:

bins = [14, 16, 18, 20]
plt.hist(data, edgecolor='white')

What should your friend do to make it work?

Select one option from the list
___

Create a free account to access the full topic