Pregunta de entrevista de Art & Logic

2 part coding question, followed by an essay section.