The distribution of W is simply the PMF of W. Let us consider a dummy variable y then the range of values that y can take varies from 0 to n-k as the student knows the answers to k of them and he can go wrong in only n-k cases or he cannot go wrong at all. thus we can now write the PMF for W=y.