3/13 Plz Help Me!


#1

Can someone please help me with 3/13, I don't understand the directions and I need help.


#2

So... you see the numbers inside the array of a? You need to print those numbers if they're even. The way to print them even is to use _____ % 2 == 0. Now, how can we tell them where to get those numbers? That's why we need a for loop. So, the coding is supposed to look something like this:

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

Hope it helped!:smiley:


#3

so does 0 actually not mean 0 but a whole number? because 2/2 = 1 not 0 but 3/2 would equal a 1 plus a fraction or remainder.


#4

That's because you aren't using modulo. What you are talking about is "/", but what I am talking about is "%".


#5

a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]

for number in a:
if number % 2 == 0:
print number