Pregunta de entrevista de B&H Photo Video

I was asked a logic question about building a function.