13/13 won't work


#1

What am I doing wrong here?


#2

Nevermind, I think I just solved it. I put return total on the same indentation level as the for command so that it would run after all of the items had been taken care of by if. Is this the right thing to do?


#3

Yes, since you will want the loop to complete all iterations before returning a total.


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.