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

out put:

`[4, 16, 36, 64, 100]`

i get this:

`Oops, try again. It looks like your list has the wrong value at index 0. It should be 8.`

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

out put:

`[4, 16, 36, 64, 100]`

i get this:

`Oops, try again. It looks like your list has the wrong value at index 0. It should be 8.`

Hi here

`cubes_by_four = [x * x for x in range(1, 11) if (x*x)%4 == 0]`

You want the cube of x so it should be like that `(x**3)`

instead of `x*x`

do the same in the `if statement`

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

Thank you

Even if the above worked shouldn't it be:

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

How come is this line justified? " if the cube is evenly divisible by four". I don't see this check. Is there something I'm missing?

Shouldn't it be something like this:

cubes_by_four = [x ** 3 for x in range(1, 11) if ((x ** 3) // 4) % 2 == 0]

Here's what I came up.

(This was tricky)

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

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

print cubes_of_four

output: [8, 64, 216, 512, 1000]

None

error message: Oops, try again.

You got the following error: global name 'cubes_by_four' is not defined. Did you create a list called cubes_by_four?

can somebody guide me as to where I am going wrong?

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

print cubes_by_four

Hi @xiaokiraa.

The ==0 at the end is used to check whether the mod 4 of the number gives remainder 0. Basically the mod function is used to divide a number and return the remainder after division.

So in the above code the cube of the number is divided by 4 and is checked whether the number after cubing is divisible by 4 using the ==0

Hope this helps

Try this one

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

print cubes_by_four

I was just trying to figure that out too. I think it’s because the problem wants you to print `x**3`

, so the `x**3`

at the start prints the cubed value and the x**3 in the if statement filters out the cubed numbers that are divisive by 4

The instructions specify this …

The comprehension should consist of the cubes of the numbers 1 through 10 only if the cube is evenly divisible by four.

Based on that, it is the cube of each number that should be tested. Accordingly, the author of the course intended for the user to write this as the condition in the list comprehension …

```
n ** 3 % 4 == 0
```

There are various ways to accomplish the required outcome. Other conditions will also pass, provided that the result is that `cubes_by_four`

includes all of the appropriate numbers, and only those numbers.