Answer:
A function is a relation that maps inputs from a set called the domain, into outputs from a set called the range.
Such that each input can be mapped into only one output.
So for example, if we have a relation that maps the input 2 into two different values:
f(2) = 4
f(2) = 8
Then this is not a function.
In the case of the problem, we have a student as the input, and the hair color as the output.
So we will have something like:
f(student) = blond
And if this student decides to change his/her hair color to red?
Then the function becomes:
f(student) = red
So for the same input, we had two different outputs, which means that this is not a function.
We also could have the case where a given student has two colors (Californian for example)
Where again, we would see two different outputs for one single input.