Question: what is the slope of a vertical line and horizontal line?
Answer: The number "zero" exists, so horizontal lines do indeed have a slope. But vertical lines don't have any slope; "slope" simply doesn't have any meaning for vertical lines.