Final answer:
There are 5,040 possible codes for a 4-digit lock using numbers 0-9 without repeating digits. The probability of guessing the correct code on the first try is about 0.0001984.
Step-by-step explanation:
The number of possible codes for a 4-digit lock using the numbers 0-9 without repeating any digit can be calculated using permutations, because the order in which we select the digits matters. The first digit has 10 possible choices (0-9), the second digit then has 9 choices (since one digit has already been used), the third has 8 choices, and the fourth has 7 choices. So, the total number of possible codes is calculated as 10 x 9 x 8 x 7.
The probability of guessing the correct code on the first try is simply the reciprocal of the number of possible codes. Since there's only one correct code, the probability is 1 divided by the total number of possible codes.
Calculation:
- Total Number of Possible Codes = 10 x 9 x 8 x 7 = 5040
- P(correct code) = 1 / Total Number of Possible Codes = 1 / 5040 ≈ 0.0001984