Answer: 420 different codes.
Step-by-step explanation:
We have eight digits, {0, 0, 0, 0, 2, 2, 4, 4}
For the first digit of the code, we will have 8 options.
For the second we will have 7 options (because we already took one)
for the third one we will have 6 options, and so on.
for the fourth, we will have 5 options
for the fifth, there are 4 options.
for the sixth, there are 3 options.
for the seventh, there are 2 options.
And for the last, there is only one option.
The total number of combinations will be equal to the product between the numbers of options for each digit, then we will have:
C = 8*7*6*5*4*3*2*1
But there is something more, the zeros can permute and will give the same code (So we are counting the same code several times), we have 4 zeros, then the number of permutations of the zeros is:
4*3*2*1 = 24
the 4's also are repeated, two times in this case, the number of permutations is:
2*1 = 2
And the 2's also are repeated, also two times, the number of permutations is:
2*1 = 2
Because we do not want to count these repetitions, we need to divide the total number of combinations by these 3 numbers of permutations
This means that we need to divide the number of different combinations will be:
c = (8*7*6*5*4*3*2*1)/(24*2*2) = 420
So we can conclude that there are 420 different codes.