Can sombody help me in solving this question, and write a code, and plz reply me as soon as possible

Q)A doctor is good only if the doctor satisfies the following conditions:

He is a...