You have 10 digits: 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, among them there are 5 odd digits: 1, 3, 5, 7, 9.
A security alarm requires a four-digit code with only odd different digits. On the first place of the code could be 1 digit from 5 odd digits, on the second place of the code could be 1 digit from remaining 4 digits, on the third place could be 1 from remaing 3 digits and on the last fourth place could be 1 from remaining 2 odd digits. In total you can create 5·4·3·2=120 different four-digit code with only odd different digits.
In the same way you can count how many different codes you can create from all digits: on the first place of the code could be 1 digit from 10 digits, on the second place of the code could be 1 digit from remaining 9 digits, on the third place could be 1 from remaing 8 digits and on the last fourth place could be 1 from remaining 7 digits. In total you can create 10·9·8·7=5040 different four-digit code with different digits.
Then the probability that the code only contains odd numbers is
.
Answer: correct choice is D.