Issue with loop

In order to modify a global in a loop you must write global a.

2 Likes