def get_instructor_by_cID_and_lecNum(cursor, cID, lecNum):
    """
    cursor: the cursor of our connection.
    cID: a string, e.g., "CSC148"
    lecNum: a string, representing the course section e.g. Lec 5101, Tut 0106
    -------------------------------------------------------
    Returns the instructor of the course given by cID and lecNum
    -------------------------------------------------------
    We use cursor here to avoid unnecessary connections with database.
    """
    sql = "SELECT instructor FROM Course Where cID like %s And lecNum = %s"
    cursor.execute(sql, ("%{}%".format(cID), lecNum))

    return cursor.fetchone()[0]