When a die is thrown, there are total six outcomes, i.e., 1, 2, 3, 4, 5 and 6.
(a) 2, 3, 5 are prime numbers. So there are 3 outcomes out of 6.
Therefore, probability of getting a prime number = 36=12
(b) 1, 4, 6 are not the prime numbers. So there are 3 outcomes out of 6.
Therefore, probability of getting a non-prime number = 36=12