I use a few Python files to generate problems with solutions (and figures or tables where needed) for the exams. They are mostly written in Jupyter notebook. There are comments but possibly not enough (and moreover they are half Italian and half English). By looking at the code you'll see that in some files you have to enter parameter values of your choice, while other files load random numbers so you just have to run them and see the results. If anyone is interested just email me, I would be happy to add explanations.

The files - those with extension .py or .ipynb - can be downloaded here.
In particular: