Problem: Given n number of dice to throw, find the probability that in a single throw of the dice there is exact one even number. You cannot use any vectors or matrices, or any vectorized operations. Instead, use a double for-loop (one over the different trials, and another one for the different number of dice used).
I am confused on how to make sure that there is only one even number per trial.
Best Answer