Answer: 5040
=============================================
Step-by-step explanation:
We have 10 digits to choose from {0,1,2,3,4,5,6,7,8,9} for slot A
Then after making that first selection, there are 10-1 = 9 choices left for slot B
Then for slot C, there are 10-2 = 8 choices
Finally for slot D, there are 10-3 = 7 choices
We have a steady countdown: 10,9,8,7
Overall, there are 10*9*8*7 = 5040 different permutations
Order matters because a code like 1234 is different from 4321
--------------
Alternative Method:
We can use the nPr permutation formula with n = 10 and r = 4
nPr = (n!)/((n-r)!)
10P4 = (10!)/((10-4)!)
10P4 = (10!)/(6!)
10P4 = (10*9*8*7*6!)/(6!)
10P4 = 10*9*8*7
10P4 = 5040
and we get the same result.