The slope of a line parallel to Y-axis is zero.
The slope of a line passing through points (x1,y1) and (x2,y2) is y2−y1x2−x1.
Given the line is parallel to Y-axis.
⟹ the points on the line has the same abscissa. I.e. x1=x2
I.e. the denominator of the expression y2−y1x2−x1 is zero. Hence the slope of a line parallel to Y-axis cannot be determined.