Answer:
40,320 codes
Explanation:
There are 8 numbers in total
8 _ _ _ _ _ _ _
The first digit can have 8 different possible numbers
8 7 _ _ _ _ _ _
The second digit can have 7 different possible numbers because one of the numbers are already in the 1st space
8 7 6 _ _ _ _ _
The third space can have 6 different possible numbers because the first two spaces are already occupied
This would continue until all spaces has been filled
8 7 6 5 4 3 2 1
Now just multiply the numbers: 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1 = 40,320
(this type of math is called permutations and combinations)