How many functions $ f: \{1, 2, 3, \dots, 10\} \to \{0,1\}$ satisfy $f(1) + f(2) + \dots + f(10) = 2$? How many functions $ f: \{1, 2, 3, \dots, 10\} \to \{0,1\}$ have this property: $$f(1) + f(2) + \dots + f(10) = 2.$$
I understand just $2$ functions can be $1$, the rest have to be $0$, in total there are $2^{10}$ functions, but how can I find out how many of them have this property?

HINT: As you said in the question, exactly two of the functions values must be $1$, and the other eight must be $0$. How many ways are there to choose $2$ things from a set of $10$ things (i.e., to choose which two function values are to be $1$)?
