20: Functions and Files
Remember your checklist for functions, then do this exercise paying close attention to how functions and files can work together to make useful stuff. You should also continue to only type a few lines before running your code. If you catch yourself typing too many lines then delete them and do it again. Doing this uses
python to train your understanding of Python.
Here's the code for this exercise. Once again, it's long so if you find Jupyter is difficult to use then write a
ex20.py file and run it that way.
Register for Learn Python the Hard Way, 5th Edition (2023-2024)
Register today for the course and get the all currently available videos and lessons, plus all future modules for no extra charge.