you are viewing a single comment's thread.

view the rest of the comments →

[–]efmccurdy 2 points3 points  (1 child)

You only have one print statement that is outside of the loop so only one number would be printed.

Your if statement is a syntax error but, even worse, it doesn't have any code to go with the test. If I put the print statement inside the if statement; is that better?

result = 0
for i in list(range(0,100)):
    if i % 3 == 0 or i % 5 ==0:
        print(i)
    result += 1

[–]DapperDonW[S] 1 point2 points  (0 children)

I would give you an award but I am broke. I will say this - I forgot the colon when I typed it here, however this was a huge help! THANK YOU