in a quiz competition, a student answers n questions correctly and was given D(n +…