
Quoting Michel Paul <mpaul@bhusd.k12.ca.us>:
This is simply a Python module that blends text and code.
This is a good illustration that Python is a particularly suitable language for literate programming (http://en.wikipedia.org/wiki/Literate_programming).
The goal here is to create something that would be of value to both math and programming students.
Yes, indeed, this kind of texts can be beneficial for both math students and programming students. Returning back to my years as a *programming* student, I think I would have been excited about the potential of lazy evaluation (http://en.wikipedia.org/wiki/Lazy_evaluation) in Python. Years ago I implemented an implicit lazy evaluation interpreter for John Backus' FP language, but because it was the *only* evaluation mode for all sequences, it made the whole interpreter too slow. Python's lazy evaluation is explicit and hence employed only as needed, and obviously it does not impose unacceptable performance penalties. Returning back to my years as a *math* student, Michel's example would have helped me to understand the potential of Python as a tool for modeling of interesting math concepts (in contrast to the widespread view to programming languages as number-crunching tools). Great writing, Michel. I hope that you can post more like this. Atanas -- Atanas Radenski mailto:radenski@studypack.com http://studypack.com mailto:radenski@chapman.edu http://www1.chapman.edu/~radenski