What is the slope of a line that is parallel to y=2?

What is the slope of a line that is perpendicular to y=2?

Is it "0"?

Think of the line y = 2 as

y = 0x -2

so you are right, the slope is 0

but the slope of a vertical line is undefined.