Yes, it is a function. One-to-one mappings and many-to-one can both be classified as functions; One-to-many mappings are the only kind that can't be classified as functions.
You and a friend went to the movies. you spent half your money on tickets. then you spent 1/4 of the money on popcorn, $2 on candy, and $3 on a soda. if you have $1 left, hiw much money did u take to the movies?