
Ryan B. answered 09/30/20
MBA working in Finance
Since order matters in this problem (i.e. 5678 and 8765 are distinct codes), this is a permutation with no replacement. The formula for a permutation with no replacement is n!/(n-r)!, where n the number of available choices, and r is the number of choices you need to make.
In this problem, n is 10, since there are 10 possible numbers to choose from. R is 4, since there are 4 choices we need to make. Thus, 10!/(10-4)! = 3,628,800/720 = 5,040 possible permutations.