The following code block shows the (app.py) application’s full source code: