What is the probability (rounded to 3 decimal places) that 2 randomly selected months both have 31 days?

say n months have 31 days

then the chance the first one has 31 days is n / 12
now you have 11 months and (n-1) have 31 days
so the chance the second one has 31
= (n-1) /11
so the answer is
(n/12) * (n-1)/11