3. Control Flow and Looping


#1



Hi,

Can you help me with the code. What is wrong?

a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
for number in a:
    if number % == 0:
        print number

THX


#2

The modulo returns the remainder when you divide it by something. Right now you aren't dividing it by anything.

if number % ## == 0:

#3

ow I totally overlooked it. Thank you :slight_smile:


#4

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