Pregunta de entrevista de Finshell

Question was based on the assignment.