Write spread(values): one number for how spread out a list is. 0 means every value is the same; bigger means further apart. The starter uses the biggest minus the smallest. Run it and see.
Two classes took a quiz out of 10. Each class’s scores start in one pile at its centre and scatter out to where they landed. Both run from 0 to 10, but in the first most people got 5, and in the second most got 0 or 10.
spread(values)| values | a list of numbers | e.g. [7, 7, 7, 7] |
| returns | how spread out they are (0 if all the same) | |