4.8 Summary
This chapter introduced three types of Python collections: lists, tuples, and dictionaries. Together with strings, these four data types provide us with a powerful set of tools for solving problems. To investigate the use of these collections, we developed a set of algorithms for performing basic statistical analysis. In particular, we implemented functions to compute the following:
▶ Dispersion (simple range and standard deviation)
▶ Central tendency (mean, median, and mode)
▶ Frequency distribution
We introduced the methods of the statistics
module, which also perform these operations.Finally, we used the Turtle
class to create a graphical representation of a frequency histogram.
Key Terms
bar chart
central tendency ...
Get Python Programming in Context, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.