In the context of this exercise, are the start and end values for the
range parameter inclusive or exclusive?
plt.hist(data, range=(start, end))
In a histogram, the start value data is inclusive, but the end value data is exclusive. In order to include the last value correctly, you can do
plt.hist(data, range=(start, end+1))
to include the end value.
Also, when determining the values for each bin in the histogram, there is an important difference regarding the range of values each one will use. For every bin in the histogram, except for the final bin, the range of values is
end_i are the start and ending values for each bin.
[ means inclusive of the start value, and
) means exclusive of the end value.
The final bin in a histogram is inclusive of the end value,
For example, if we had 5 equally spaced bins from 0 to 5, each bin will include the data ranges as follows.