import math


def linear_slope(start_pos, end_pos):
    """Linear slope of line.
    :param start_pos Tuple[int,int]:
    :param end_Pos Tuple[int,int]:
    :returns number or nan: nan if vertical slope
    """
    try:
        return \
            (end_pos[1] - start_pos[1]) \
            / (end_pos[0] - start_pos[0])
    except ZeroDivisionError:
        return math.nan