To enter undefined in WeBWorK, type "undefined" when asked for the slope of a vertical line. A vertical line has no slope, which is undefined.