Demonstrating code execution; Online Python Tutor

With !bc pyoptpro or a file *.pyopt, the code applies the Online Python Tutor for displaying program flow and state of variables: