With these unlikely pieces of code, the intention is to teach you to hand-trace.

Make a table with all the variables and then run through the program manually.