Yes, it is a function.
Any function equal to a constant (e.g. y=4, y=7.8) is considered a function as it passes the vertical line test.
Feel free to ask me any questions about my answer :)