1. Problem description
An error occurs when drawing the histogram
2. Solution
Wrong pyplot.hist(heights, 20, normed=True, histtype='step', cumulative=True)
Right pyplot.hist(heights, 20, density=True, histtype='step', cumulative=True)
The #normed parameter is replaced by density, which may be a version problem.