selecting random number of questions for selected subject