def compute_slope(cursor, fid):
    """Compute the simple slope for the fid"""
    cursor.execute(
        "SELECT max(elevation), min(elevation), max(length) "
        "from flowpath_points where flowpath = %s and length < 9999",
        (fid,),
    )
    row2 = cursor.fetchone()
    return (row2[0] - row2[1]) / row2[2]