Answer:
1 in 10000
1 in 24
Explanation:
The first question can be solved by finding the fractional chances of success for each digit. Since your chance for each digit to be correct is 1/10 (10 digits total), you'd then do that again 3 more times to get 4 digits entered. 1/10 × 1/10 × 1/10 × 1/10.
For the second question, the circumstances change because there are only 4 possible digits and each is used exactly once. This means your first guess is hardest (1/4) and your last guess is easiest (1/1), assuming you got them right until then (which is what we are testing for). 1/4 × 1/3 × 1/2 × 1/1 because each step has one less possible answer than the previous.