CodeClause interview question

I only have to complete the assigned task.