Explain why the slope of a horizontal line is zero, and the slope of a vertical line is undefined.
The slope is the tangent of the enclosed angle. Tan = vertical side divided by horizontal side. With a horizontal line, the verticle side is zero and zero/any number is zero.
For the vertical line, the horizontal side is missing (zero) and any number divided by zero is undefined.