+ 1
Help me to solve issue in my code
There is error written as a comment. I do not understand what is wrong there. Please help. https://code.sololearn.com/c6V5a3Oq2Sy2/?ref=app
3 Answers
+ 5
The scope of variable a is only within the inner for loop. So it isn't valid to be used in the outer for loop.
You had better initialize a outside the loops.
+ 4
a is not accessible outside the for loop.So if you wanna use it outside the loop, you will have to initialize it outside the loop
+ 3
Thanks!