If a password consists of 6 to 8 characters, each character is a letter or a digit and letters are case-sensitive. If a password is selected randomly what's the probability that password consists at least one digit?

(I did it this way just tell me if it's correct or not.)

Total Samples of Passwords = $62^6 + 62^7 + 62^8$

Samples of Passwords with at least one digit = Total - Passwords with no digits $$(62^6 - 52^6) + (62^7 - 52^7) + (62^8 - 52^8)$$

Probability = Favourable/total $\approx 0.754$ Ans.

Is it correct?

• looks correct to me – gt6989b Jul 27 '17 at 16:06