on line 4 current value of result is multiplied by current value of indx (that is right-hand side of the equal sign) and the result is assigned as new value of result
maybe if you add two print functions it will help
maybe if you add two print functions it will help
result = 1 for indx in range (10): if (indx % 2 == 0): continue # I moved this on separate line just for more redability print('result before multiplication: {}, indx: {}'.format(result, indx)) result = result * indx print('result after multiplication: {}'.format(result))Note that you may see something like this
result *= indxThis is the same, but written a bit shortly
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs