Let:
A = Unlock the table on the first try
a = Number of Possible right digits
N = Total number of possible digits
the probability the spy is able to unlock the tablet on his first try is:
[tex]\begin{gathered} P(A)=\frac{a}{N} \\ P(A)=\frac{1}{10} \end{gathered}[/tex]