Well if one repeats and the others are both different and this is a code so the first digit can be zero THEN
Pick 3 numbers out of 10 = 10C3 = 120
these can be arranged in 3! =6 ways
120*6= 720 3 digit numbers.
There are 3 possibilities for the 4 digit
and the 4th digit can go in 4 different places.
but there are 2 the same so must divide by 2
so we have
120*6*3*4/2 = 4320 ways I think
there are 10^4 = 10000 four digit numbers if the first one can be zeros
so the prob of chosing one with just one digit that repeats is 4320/10000 = 0.432 = 43.2%
x=43.2
If ithe number cannot start with 0 then it would be different.
I can work this out but it is quite a bit more complicated.