6/18 syntax error


#1
cubes_by_four = [i**3 in range(1,11) if i**3 % 4 == 0]
print cubes_by_four

i have no clue whats wrong but everytime, it shows me:
"Oops, try again. Your code looks a bit off. You got the following error: invalid syntax (python, line 1)."


#2

hello @microblaster93274 you have forgotten the for i in range(1,11) and the "()" of your if statement.

try

cubes_by_four = [i**3 for i in range(1,11) if (i**3)% 4 == 0]
print cubes_by_four

#3

even_squares = [x**2 for x in range(1,12) if (x**2) % 2 == 0]

:wink:

I just guessed it and somehow i managed to get it right. i don't even know what it says. my math is RUBBISH!!!


#4

[i**3 for i in range(1,11) if i**3 % 4 == 0]


#6

"for i in range(1,11)"