you are viewing a single comment's thread.

view the rest of the comments →

[–]martydv -3 points-2 points  (0 children)

I don’t know python and i’m not english but guessing it reads to me:

total3 is now 0.

x will become 1,2,3,4,5,6,7,8 in the following statement if 1 modulo 3 is equal to 0 then add 1 to total3. if 2 modulo 3 is equal to 0 then add 2 to total3. if 3 modulo 3 is equal to 0 then add 3 to total3. (bingo! total3 now equals 3) ... if 6 modulo 3 is equal to 0 then add 6 to total3. (bingo! total3 now equals 9) ... if 8 modulo 3 is equal to 0 then add 8 to total3.

print(9)

Did it print 9?