Let N be a randomly chosen 5-digit number.

a. What is the probability that N contains at least one zero?

b. What is the probability that N contains at least one 7?

c.
What is the probability that it contains exactly one zero and one 7?

d. Generalize the above questions for a n-digit number , n>1.

Assuming leading zeroes, the 0 can be in 5 places, after which the 7 can be in 4 places, after which the remaining 3 places can each have one of 8 different digits.

Total numbers = 5*4*8*8*8 = 10240.

Probability = 10240/100000 = .1024

If there are n digits, probability = n*(n-1)*8^(n-2)/10^n