How do you find the slope of y=2?
This is the equation representing a perfectly horizontal line. This line neither goes up nor down so its slope, describing the inclination of the line, must be zero.
Also, from the definition of slope
but for every choice of two