Python is a dynamically typed and interpreted language and automated tests are often a must, in particular for research software.
Please browse pytest and experiment with implementing and running tests using pytest. When you solve the exercises below, try to write tests for your code at the same time.