Ravity interview question

Explain the whole asiignment given. Very basic Data Science Questions