The correct option is D 310
The sample space for the given experiment is
S = {1, 2, 3, 4, ...., 39, 40}
n(S) = 40
Let A be the event that the number selected is divisible by 5.
Then A = {5, 10, 15, 20, 25, 30, 35, 40}
n(A) = 8
⇒P(A) = 840
Let B be the event that the number selected is divisible by 7.
Then B = {7, 14, 21, 28, 35}
n(B) = 5
⇒P(B) = 540
Now,
A∩B = {35}i.e., n(A∩B) = 1Thus, P(A∩B) = 140
By addition rule of probability,
P(A∪B) = P(A)+P(B)−P(A∩B)= 840 + 540− 140= 1240= 310
Therefore, probability that the selected number is divisible by 5 or 7 is 310.