Lets find the probability of failure and subtract from 1 since we have 3 attempts.
In first attempt, probability of failure $ = \frac{9}{10}.$
In second attempt, we won't select the number already tried. So, probability of failure $ = \frac{8}{9}.$
Similarly, in third attempt, probability of failure $ = \frac{7}{8}$.
So, probability of success $ = 1 - \frac{9}{10}\frac{8}{9}\frac{7}{8} \\=1 - \frac{7}{10} = \frac{3}{10}.$
If after each chance, the corect number is changed, then the probability of failure for each try remains $\frac{9}{10}$ and we get probability of success $ = 1 - {\frac{9}{10}}^3 = \frac{271}{1000}.$