Sep-30-2017, 07:22 PM
There are several problems here. First is that you didn't use python tags like I asked you to. Indentation is important in python, and without those tags I can't see what your indentation is. Assuming the indentation is correct, the second problem is that capitalization matters. The variable Text is not the same as the variable text, and the variable I is not the same as the variable i. I is a bad name for a variable, anyway. Try something more descriptive, like rows. The third problem is the condition
i < 0
. I is probably going to be positive when entered, and you increase it by one each time through the loop. Therefore it will never be less than zero. You probably want to decrease it each time through the loop, and test that it is greater than zero. Finally, you are adding the wrong thing to sum.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures