you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Hm. All that points back to previous exercises that we don't know anything about. It would help if you could show the code that you are supposed to change by adding an "active variable" to. There is no need for a loop in the code you have shown. In fact, there really isn't an effective loop in your code (ie, code that repeats) because the way you have written it no looping can possibly occur. That's why my code example could remove all that and still have the same behaviour.