Example 4. A natural number not exceeding 10 is chosen at random. What is the probability that this number is prime?
Solution. Let $C$ be the event "the selected number is prime". In this case, $n=10, m=4$ (prime numbers $2,3,5,7$). Therefore, the required probability

$$
P(C)=\frac{4}{10}=0.4
$$