def lesser(tup,value):
    """
    Returns the number of elements in tup strictly less than value

    Examples:
        lesser((5, 9, 1, 7), 6) returns 2
        lesser((1, 2, 3), -1) returns 0

    Parameter tup: the tuple to check
    Precondition: tup is a non-empty tuple of ints

    Parameter value:  the value to compare to the tuple
    Precondition:  value is an int
    """
    assert type(tup) == tuple, 'tup isnt a tuple'
    assert len(tup) >= 1, 'tuple cant be empty'
    assert type(value) == int, 'value isnt an int'

    count = 0

    for index in tup:      # assigns index as a element in tup equiv to index = tup[:]?
        if index < value:
            count += 1

    return count
    # pass