Titun's is a good approach. however, there is a rider as below.
(a) for 2 digit case : There are 4c2 ways of choosing 2 places for a repetitive digit and that digit can be anyone of the 10. Hence, the probability = [(10*1*9*9)*(4c2)] / 10^4 = [4c2 * 9^2] /10^3 . denom is 10^3 not 10^ 4 as above.
Similarly for 3 digit case, the ans is [4c3 * 9]/10^3 similarly for 4 digit case, the ans is [1/ 10^3]. rgds.