4.3 Step 11 Fill in the blank issue


Is someone able to look at my submission and tell me what I am doing wrong? I have entered the exact code into Repl and it runs correctly but I cant seem to find out what I am doing wrong.

Thank you,

Going to post code to see if other can assist :slight_smile:

for number in range(1,41):
if number % 3 == 0:
elif number % 7 == 0:

The “elif” may not be useful. For example, it may be that the number is neither divisible by 3 or 7, so it’s not really an “elif” situation-- probably another “if”.

@AlexC: There may also be numbers that are divisible by both 3 and 7. Your solution needs to account for that.

Right. elif (else if) basically means “if the first thing isn’t true check to see if this new thing is true”. But it’s possible that both things could be true, so don’t use elif.