def search(x, seq):
    for a, i in enumerate(seq):
        if x <= i:
            return a
    return len(seq)

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    elif x < seq[0]:
        return 0
    elif x > seq[len(seq)-1]:
        return len(seq)
    else:
        product = 0
        for i in range(len(seq)-1):
            if x == seq[i]:
                product = i
            elif (seq[i] <= x and x <= seq[i+1]):
                product = product + i + 1
        return product

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if seq[i] >= x:
            return i
            continue
    return len(seq)

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    else:
        for i, element in enumerate(seq):
            for element in seq:
                if x > element:
                    i+=1
            return i

Task: Sequential Search


def search(x, seq):
    index = 0
    for i in range (len(seq)):
        if x <= seq[i]:
            break
        elif x > seq[i]:
            index = i + 1
    return index

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    for i in range(len(seq)):
        if x <= seq[i]:
            return i
    if x > seq[-1]:
        return len(seq)

Task: Sequential Search


def search(x, seq):
    result = 0
    for i in range(len(seq)):
        if seq[i] >= x:
            result = i
            break
        elif x > seq[i]:
            result = i + 1
    return result

Task: Sequential Search


def search(x, seq):
    if seq == [] or seq == ():
        return 0
    else:
        for i, elem in enumerate(seq):
            if x < elem:
                return i
            elif x == elem:
                return i
            elif i == len(seq)-1:
                return i+1

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x <= seq[i]:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):

    for i, elem in enumerate(seq):

        if x <= elem: return i

    return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == [] or seq == ():
        return 0
    else:
        for a in range(1,len(seq)):
            if seq[a] == x:
                return a
            elif seq[a-1] < x < seq[a]:
                return a
        else:
            if x > seq[-1]:
                return len(seq)
            elif x < seq[0]:
                return 0

Task: Sequential Search


def search(x, seq):
    if seq==[] or seq==():
        return 0
    searchlist = list(enumerate(seq))
    for i in range(len(searchlist)):
        if x <= searchlist[i][1]:
            return searchlist[i][0]
    return i+ 1

Task: Sequential Search


def search(x, seq):
    if seq:
        for i in range(len(seq)):
            if x <= seq[i]:
                return i
        return len(seq)
    else:
        return 0

Task: Sequential Search


def search(x, seq):
    if not seq:
        return 0
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
	position = 0
	for i in seq:
		if x > i:
			position = seq.index(i) + 1
		else:
			position = seq.index(i)
			break
	return position

Task: Sequential Search


def search(x, seq):
    l=len(seq)
    if l==0:
        return 0
    for i in range(l):
        if x<=seq[i]:
            break
    if x>seq[l-1]:
        i=i+1
    return i

Task: Sequential Search


def search(x, seq):
    a = 0
    for i in seq:
        if i < x:
            a += 1
    return a

Task: Sequential Search


def search(x, seq):
    if seq == () or seq == []:
        return 0
    else:
        for i in range(1,len(seq)):
            if x == seq[i]:
                return i
            elif seq[i-1] < x < seq[i]:
                return i
        else:
            if x > seq[(len(seq))-1]:
                       return len(seq)
            elif x < seq[0]:
                       return 0

Task: Sequential Search


def search(x, seq):
    for i, ele in enumerate(seq):
        if x <= ele:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    position = 0
    for elem in seq:
        if x <= elem:
            break
        position += 1
    return position

Task: Sequential Search


def search(x,seq):
    counter = 0
    for i in seq:
        if i < x:
            counter = counter + 1
    return counter

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if seq[i] >= x:
            return i
            continue
    return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == () or seq == []:
        return 0
    else:
        for i, elem in enumerate (seq):
            if x<=elem:
                return i
            elif x>seq[-1]:
                return len(seq)

Task: Sequential Search


def search(x, seq):
    counter = 0
    for i in range(len(seq)):
        if x <= seq[i]:
            break
        else:
            counter += 1
    return counter

Task: Sequential Search


def search(x, seq):
    counter = 0
    for elem in seq:
        if x > elem:
            counter += 1
        else:
            break
    return counter

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    elif x > seq[len(seq)-1]:
        return len(seq)
    elif x < seq[0]:
        return 0
    else:
        for i in seq:
            if x > i:
                continue
            else:
                return seq.index(i)

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    seq = tuple(seq)
    if seq == ():
        return 0
    elif x > seq[len(seq)-1]:
        return len(seq)
    else:
        i = 0
        while i <= len(seq)-1:
            if x <= seq[i]:
                return i
            elif x > seq[i]:
                i += 1

Task: Sequential Search


def search(x, seq):
    length = len(seq)
    if length == 0:
        return 0
    else:
        for i, elem in enumerate(seq):
            if x < elem:
                return i
            else:
                if x == elem:
                    return i
                if (i == length-1):
                    return i+1

Task: Sequential Search


def search(x, seq):
    if not seq:
        return 0
    elif x < seq[0]:
        return 0
    for i in range(len(seq)):
        if i == len(seq) - 1:
            return len(seq)
        if x >= seq[i] and x <= seq[i+1]:
            return i+1

Task: Sequential Search


def search(x, seq):
    a = len(seq)
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
    return a

Task: Sequential Search


def search(x, seq):
    index=0
    for i in seq:
        if x>i:
            index += 1
        else:
            break
    return index

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x<= seq[i]:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
	counter = 0
	for i in seq:
		counter += 1
		if x <= i:
			return counter-1
	return len(seq)

Task: Sequential Search


def search(x, seq):
    position = 0
    for i in range(len(seq)):
        if x > seq[i]:
            position = i + 1
        elif x == seq[i]:
            position = i
    return position

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x <= seq[i]:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    if not seq:
        return 0
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    else:
        index = -1
        for i in seq:
            if x <= i:
                index += 1
                return index
            elif x > seq[-1]:
                return len(seq)
            else:
                index += 1

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    else:
        index = -1
        for i in seq:
            if x <= i:
                index += 1
                return index
            elif x > seq[-1]:
                return len(seq)
            else:
                index += 1

def search(x, seq):
    new=list(seq)
    new.append(x)
    new.sort()
    y=tuple(enumerate(new))
    for i in range(len(y)):
        if y[i][1]==x:
            return y[i][0]

Task: Sequential Search


def search(x, seq):
    for i, ele in enumerate(seq):
        if x <= ele:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    lst = list(seq)
    lst.append(x)
    lst.sort()
    y = tuple(enumerate(lst))
    for i in range(len(y)):
        if y[i][1]==x:
            return y[i][0]

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if seq[i] >= x:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
    return len(seq)

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    c = 0
    for i in seq:
        if x > i:
            c += 1
        else:
            return c
    return c

Task: Sequential Search


def search(x, seq):
    a = 0
    for i in seq:
        if i < x:
            a += 1
    return a

Task: Sequential Search


def search(x, seq):
    if seq == [] or seq == ():
        return 0
    for elem in seq:
        if x < elem:
            return seq.index(elem)
        elif x == elem:
            return seq.index(elem)
    return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == () or seq == []:
        return 0
    if x>seq[len(seq)-1]:
        return len(seq)
    for i in range(len(seq)):
        if x>seq[i]:
            continue
        return i

Task: Sequential Search


def search(x, seq):
    a = 0
    for i in seq:
        if i<x:
            a += 1
        else:
            break
    return a

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    if int(x) < seq[0]:
        return 0
    elif int(x)> seq[len(seq)-1]:
        return len(seq)
    Index = 0
    for i in range(0,len(seq)):
        if int(x)>seq[i]:
            continue
        Index = i
        return Index

Task: Sequential Search


def search(x, seq):
    counter = 0
    for i in seq:
        if x > i:
            counter += 1
        else:
            continue
    return counter

Task: Sequential Search


def search(x, seq):
    if seq == []:
        return 0
    else:
        for i in range(len(seq)):
            if x <= seq[i]:
                return i
        return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == () or seq == []:
        return 0
    elif type(seq) == tuple:
        new_seq = list(seq)
        sort = []
        for i in range(len(new_seq)):
            if max(new_seq) < x:
                sort.extend(new_seq)
                sort.append(x)
            elif new_seq[i] >=x:
                sort.append(x)
                sort.extend(new_seq[i:])
                break
            elif new_seq[i]<x:
                sort.append(new_seq[i])
    else:
        sort = []
        for i in range(len(seq)):
            if max(seq) < x:
                sort.extend(seq)
                sort.append(x)
            elif seq[i] >=x:
                sort.append(x)
                sort.extend(seq[i:])
                break
            elif seq[i]<x:
                sort.append(seq[i])
    positions = list(enumerate(sort))
    for i in positions:
        if i[1] == x:
            return i[0]
        else:
            continue

Task: Sequential Search


def search(x, seq):
    enum_seq = enumerate(seq)
    new_seq = tuple(map(lambda x: x[0], enum_seq))
    if seq == ():
        return 0
    for a in range(len(seq)):
        if x < seq[a]:
            return new_seq[a]
        elif x == seq[a]:
            return new_seq[a]
    return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return 0
    if seq == []:
        return 0
    for c,value in enumerate(seq):
        if value>=x:
            return(c)
    else:
        return(c+1)

Task: Sequential Search


def search(x, seq):
	counter = 0
	for i in seq:
		if x <= i:
			return len(seq[:counter])
		counter = counter + 1
	else:
		return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == []:
        return 0
    for elem in seq:
        if x < elem:
            return seq.index(elem)
        elif x == elem:
            return seq.index(elem)
    return len(seq)

Task: Sequential Search


def search(x, seq):
    if not seq:
        return 0
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
	counter = 0
	for i in seq:
		counter += 1
		if x <= i:
			return counter-1
	return len(seq)

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0 or x < seq[0] :
        return 0
    elif x > seq[len(seq)-1]:
        return len(seq)
    else:
        result = 0
        for i, element in enumerate(seq):
            if x < (element + 1):
                result = i
                break
        return result

Task: Sequential Search


def search(x, seq):
    counter = 0
    if len(seq) == 0:
        return 0

    for i in seq:
        if x <= i:
            return counter
        else:
            counter += 1

    return counter

Task: Sequential Search


def search(x, seq):
    position = 0
    for i in seq:
        if x <= i:
            break
        position = position + 1
    return position

Task: Sequential Search


def search(x, seq):
    if seq==[] or seq==():
        return 0
    else:
        for i in range(len(seq)):
            if i <range(len(seq))[-1]:
                if x<=seq[i]:
                    return i
                    break
                else:
                    continue
            else:
                if x<=seq[i]:
                    return i
                    break
                else:
                    return len(seq)

Task: Sequential Search


def search(x, seq):
    position = 0
    for i in seq:
        if x > i:
            position +=1
        else:
            return position
    if position ==len(seq)-1:
        return position+1
    else:
        return position

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    if not seq:
        return 0
    elif x < seq[0]:
        return 0
    else:
        i = 0
        while i in range(len(seq)):
            if x <= seq[i]:
                return i
            elif x > seq[len(seq)-1]:
                return len(seq)
            else:
                i += 1
    return

Task: Sequential Search


def search(x, seq):
    pos = 0
    for ele in seq:
        if x <= ele:
            return pos
        else:
            pos += 1
    return pos

Task: Sequential Search


def search(x, seq):
    lst = list(seq)
    lst.append(x)
    lst.sort()
    tup = tuple(enumerate(lst))
    for i in range(len(tup)):
        if tup[i][1]==x:
            return tup[i][0]

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    length = len(seq)
    if length == 0:
        return 0
    else:
        for i, elem in enumerate(seq):
            if x <= elem:
                return i
            elif i == length-1:
                return length

Task: Sequential Search


def search(x, seq):
    a = 0
    for i in seq:
        if x <= seq[a]:
            return a
        else:
            a += 1
    return a

Task: Sequential Search


def search(x, seq):
    if not seq:
        return 0
    elif x < seq[0]:
        return 0
    for i in range(len(seq)):
        if i == len(seq) - 1:
            return len(seq)
        if x >= seq[i] and x <= seq[i+1]:
            return i+1

Task: Sequential Search


def search(x, seq):
    seq = list(seq)
    index = 0
    for i in range (len(seq)):
        if x <= seq[i]:
            break
        elif x > seq[i]:
            index = i + 1
    return index

Task: Sequential Search


def search(x, seq):
    counter=0
    for i in seq:
        if i>=x:
            break
        counter=counter+1
    return counter

Task: Sequential Search


def search(x, seq):
    index = 0
    for i in range (len(seq)):
        if x <= seq[i]:
            break
        elif x > seq[i]:
            index = i + 1
    return index

Task: Sequential Search


def search(x, seq):
    if not seq:
        return 0
    else:
        if x < seq[0]:
            indx = 0
        elif x > seq[-1]:
            indx = seq.index(seq[-1]) + 1
        else:
            for i in seq:
                if x <= i:
                    indx = (seq.index(i))
                    break
        return indx

Task: Sequential Search


###########
# Task 1a #
###########

# The enumerate function should be helpful for you here.
# It takes in a sequence (either a list or a tuple)
# and returns an iteration of pairs each of which
# contains the index of the element and the element itself.
# Here's how to use it.

# for i, elem in enumerate((4, 10, 1, 3)):
#     print("I am in the", i ,"position and I am", elem)
#
# I am in the 0 position and I am 4
# I am in the 1 position and I am 10
# I am in the 2 position and I am 1
# I am in the 3 position and I am 3

def search(x, seq):
    for i in range(len(seq)):
        if x <= seq[i]:
            return i
    return len(seq)

print("## Q1a ##")
print(search(-5, (1, 5, 10)))
# => 0
print(search(3, (1, 5, 10)))
# => 1
print(search(7, [1, 5, 10]))
# => 2
print(search(5, (1, 5, 10)))
# => 1
print(search(42, [1, 5, 10]))
# => 3
print(search(42, (-5, 1, 3, 5, 7, 10)))

Task: Sequential Search


def search(x, seq):
    if seq == () or seq == []:
        return 0
    if x>seq[len(seq)-1]:
        return len(seq)
    for i in range(len(seq)):
        if x>seq[i]:
            continue
        return i

Task: Sequential Search


def search(x, seq):
    if seq == [] or seq == ():
        return 0
    elif type(seq) == tuple:
        new_seq = list(seq)
        sort = []
        for i in range(len(new_seq)):
            if max(new_seq) < x:
                sort.extend(new_seq)
                sort.append(x)
            elif new_seq[i] >=x:
                sort.append(x)
                sort.extend(new_seq[i:])
                break
            elif new_seq[i]<x:
                sort.append(new_seq[i])
    else:
        sort = []
        for i in range(len(seq)):
            if max(seq) < x:
                sort.extend(seq)
                sort.append(x)
            elif seq[i] >=x:
                sort.append(x)
                sort.extend(seq[i:])
                break
            elif seq[i]<x:
                sort.append(seq[i])
    positions = list(enumerate(sort))
    for i in positions:
        if i[1] == x:
            return i[0]
        else:
            continue

Task: Sequential Search


def search(x, seq):
    if seq == [] or seq ==():
        return 0
    elif x > seq[ len(seq)- 1]:
        return len(seq)
    elif x < seq[0]:
        return 0
    else:
        for i in range(len(seq)):
            if x >= seq[i] and x <= seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    seq = list(seq)
    for i in range(len(seq)):
        if x > seq[i]:
            continue
        elif x <= seq[i]:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    ns = tuple(enumerate(seq))
    for y in ns:
        if x <= y[1]:
            return y[0]
    return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq==[] or seq==():
        return 0
    else:
        for i in range(len(seq)):
            if i <range(len(seq))[-1]:
                if x<=seq[i]:
                    return i
                    break
                else:
                    continue
            else:
                if x<=seq[i]:
                    return i
                    break
                else:
                    return len(seq)

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if x > elem and i == len(seq) - 1:
                        # specifies case where i has reached the last element in the tuple or list
            return i + 1
        elif x > elem:
            continue
        else:
            return i
    if len(seq) == 0:
        return 0
    # this is if seq is empty
    # if not defined, task 3(a) won't work

Task: Sequential Search


def search(x, seq):
    num = 0
    for i in seq:
        if x <= seq[num]:
            return num
        num += 1
    else:
            return num

Task: Sequential Search


def search(x, seq):
    list2 = list(enumerate(seq))
    if list2 == []:
        return 0
    else:
        for i in list2:
            if x <= (i[1]):
                return i[0]
        return len(seq)

Task: Sequential Search


def search(x, seq):

    new_lst = []

    if len(seq) == 0:

        return 0

    for i, elem in enumerate(seq):

        new_lst.append((i, elem))

    for i in new_lst:

        if x <= i[1]:

            return i[0]

        else:

            continue

    return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x <= seq[i]:
            return i
    else:
        return len(seq)

Task: Sequential Search


def search(x, seq):
    if len(seq)==0:
        return 0
    for i in range(len(seq)):
        if seq[i]>=x:
            break
        elif seq[-1]<x:
            return len(seq)
    return i

Task: Sequential Search


def search(x, seq):
    i = 0
    for ele in seq:
        if ele>=x:
            break
        i += 1
    return i

Task: Sequential Search


def search(x, seq):
    result=0
    for i in seq:
        if x>i:
            result+=1

    return result

Task: Sequential Search


def search(x, seq):
    lst = list(seq)
    lst.append(x)
    lst.sort()
    tup = tuple(enumerate(lst))
    for i in range(len(tup)):
        if tup[i][1]==x:
            return tup[i][0]

Task: Sequential Search


def search(x, seq):
    counter = 0
    for i in range(len(seq)):
        if x <= seq[i]:
            break
        else:
            counter += 1
    return counter

Task: Sequential Search


def search(x, seq):
    position = 0
    for elem in seq:
        if x <= elem:
            break
        position += 1
    return position

Task: Sequential Search


def search(x, seq):
    i = 0
    for i, element in enumerate(seq):
        if x <= element:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if elem >= x:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    if list(seq) == []:
        return 0
    else:
        for element in seq:
            if x <= element:
                return list(seq).index(element)
            elif x == max(seq):
                return list(seq).index(max(seq))
            elif x >= max(seq):
                return (list(seq).index(max(seq)))+1

Task: Sequential Search


def search(x, seq):
    if seq==():
        return 0
    elif seq==[]:
        return 0
    else:
        for i in range(len(seq)):
            if seq[i] >= x:
                return i
        return len(seq)
    return

Task: Sequential Search


def search(x, seq):
    if seq==():
        return 0
    elif seq==[]:
        return 0
    else:
        pos=0
        for i, elem in enumerate(seq):
            if elem >= x:
                return i
        return i+1

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
            break
        elif x > elem:
            continue
    return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == [] or seq == ():
        return 0
    if x < seq[0]:
        return 0
    elif x > seq[len(seq)-1]:
        return len(seq)
    else:
        for i in range(len(seq)):
            if seq[i] == x:
                return i
            elif seq[i] <= x and seq[i+1] > x:
                return i+1

Task: Sequential Search


def search(x, seq):
    n = 0

    for i in seq:
        if x <= i:
            return n
        else:
            n += 1

    return n

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    if seq==[] or seq==():
        return 0
    elif x<seq[0]:
        return 0
    elif x>seq[-1]:
        return len(seq)
    for i in range(len(seq)-1):
        if x>seq[i] and x<=seq[i+1]:
            return i+1

Task: Sequential Search


def search(x, seq):
    for i, e in enumerate(seq):
        if x < e:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x <= seq[i]:
            return i
    return i + 1

Task: Sequential Search


def search(x, seq):
    i = 0
    for i in range(len(seq)):
        if x <= seq[i]:
            return i
    return i + 1

Task: Sequential Search


def search(x, seq):
    if x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    else:
        seq_enum = [i for i in enumerate(seq)]
        for j in range(len(seq_enum) - 1):
            if x >= seq_enum[j][1] and x <= seq_enum[j+1][1]:
                return j+1

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return 0
    elif x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    else:
        seq_enum = [i for i in enumerate(seq)]
        for j in range(len(seq_enum) - 1):
            if x >= seq_enum[j][1] and x <= seq_enum[j+1][1]:
                return j+1

Task: Sequential Search


def search(x, seq):
    lst1 = list(seq)
    if len(lst1) == 0:
        i = 0
    else:
        length = len(lst1)
        lst2 = []
        if x < seq[0]:
            lst2 = [x] + lst1
        elif x > seq[length -1]:
            lst2 = lst1 + [x]
        else:
            for i in range(0, length):
                if seq[i] <= x <= seq[i+1]:
                    lst2 = lst1[:i+1] + [x] + lst1[i+1:]
        for i in range(len(lst2)):
            if x == lst2[i]:
                return i

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x <= seq[i]:
            return i
        else:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == () or seq == []:
        return 0
    elif x <= seq[0]:
        return 0
    elif x >= seq[-1]:
        return len(seq) - 1
    else:
        seq_enum = [i for i in enumerate(seq)]
        for j in range(len(seq_enum) - 1):
            if x >= seq_enum[j][1] and x <= seq_enum[j+1][1]:
                return j+1

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if elem < x < elem + 1:
            return i + 1

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if elem <= x <= elem + 1:
            return i

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if elem <= x <= elem + 1:
            return i + 1

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if elem <= x <= elem + 1:
            return i - 1

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if elem < x < elem + 1:
            return i

Task: Sequential Search


def search(x, seq):
    if x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)

Task: Sequential Search


def search(x, seq):
    if x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    for i, elem in enumerate(seq):
            if elem <= x <= elem + 1:
                return i

Task: Sequential Search


def search(x, seq):
    if x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    for i, elem in enumerate(seq):
            if elem <= x:
                return i

Task: Sequential Search


def search(x, seq):
    if x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    for i, elem in enumerate(seq):
            if x < elem:
                return i

Task: Sequential Search


def search(x, seq):
    if x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    for i, elem in enumerate(seq):
            if x <= elem:
                return i

Task: Sequential Search


def search(x, seq):
    if x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    elif seq == ():
        return 0
    for i, elem in enumerate(seq):
            if x <= elem:
                return i

Task: Sequential Search


def search(x, seq):
    if x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    elif seq == ():
        return None
    for i, elem in enumerate(seq):
            if x <= elem:
                return i

Task: Sequential Search


def search(x, seq):
    if x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    elif seq == () or seq ==[]:
        return None
    for i, elem in enumerate(seq):
            if x <= elem:
                return i

Task: Sequential Search


def search(x, seq):
    lst = list(seq)
    for i in range(len(lst)):
        if x < lst[i]:
            lst.insert(i,x)
        else:
            lst.insert(len(lst),x)
    for i in range(len(lst)):
         if lst[i] == x:
             return i

Task: Sequential Search


def search(x, seq):
    if x < int(seq[0]):
        return 0
    elif x > int(seq[len(seq)-1]):
        return len(seq)
    else:
        for i in range(len(seq)):
            if x > seq[i] and x <= seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return 0
    elif x < int(seq[0]):
        return 0
    elif x > int(seq[len(seq)-1]):
        return len(seq)
    else:
        for i in range(len(seq)):
            if x > seq[i] and x <= seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    a = len(seq)
    if x < seq[0]:
        return 0
    elif x > seq[-1]:
        return a
    else:
        for i in range(a):
            if x == seq[i]:
                return i
            elif x < seq[i]:
                return i

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
        elif x > seq[-1]:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return 0
    else:
        for i, elem in enumerate(seq):
            if x <= elem:
                return i
            elif x > seq[-1]:
                return len(seq)

Task: Sequential Search


def search(x, seq):

    for i in range(len(seq)):
        if x<=seq[i]:
            return i
        elif x>=seq[len(seq)-1]:
            return len(seq)
        else:
            continue

Task: Sequential Search


def search(x, seq):

    for i in range(len(seq)):
        if x<=seq[i]:
            return i
        elif x>=seq[len(seq)-1]:
            return len(seq)
        elif len(seq)==0:
            return 0
        else:
            continue

Task: Sequential Search


def search(x, seq):

    for i in range(len(seq)):
        if x<=seq[i]:
            return i
        elif x>seq[len(seq)]:
            return len(seq)
        elif len(seq)==0:
            return 0
        else:
            continue

Task: Sequential Search


def search(x, seq):

    for i in range(len(seq)):
        if len(seq)==0:
            return 0
        elif x<=seq[i]:
            return i
        elif x>seq[len(seq)-1]:
            return len(seq)

        else:
            continue

Task: Sequential Search


def search(x, seq):
    if seq == []:
        return 0
    if x < seq[0]:
        return 0
    elif x > seq[len(seq)-1]:
        return len(seq)
    else:
        for i in range(len(seq)-1):
            if seq[i] == x:
                return i+1
            elif seq[i] < x and seq[i+1] > x:
                return i+1
            else:
                return None

Task: Sequential Search


def search(x, seq):
    for i in range(1, len(seq)+1):
        if x < seq[i-1]:
            return i-1
        elif seq[i-1]<x<seq[i]:
            return i
        else:
            return i

Task: Sequential Search


def search(x, seq):
    for i in range(1, len(seq)+1):
        if x < seq[i-1]:
            return i-1
        elif seq[i-1]<x<seq[i]:
            return i-1
        else:
            return i-1

Task: Sequential Search


def search(x, seq):
    for i in range(1, len(seq)+1):
        if x < seq[i-1]:
            return i-1
        elif seq[i-1]<x<seq[i]:
            return i-1
        else:
            return i

Task: Sequential Search


def search(x, seq):
    for i in range(1, len(seq)+1):
        if x < seq[i-1]:
            return i-1
        elif seq[i-1]<x<seq[i]:
            return i
        else:
            return i-1

Task: Sequential Search


def search(x, seq):
    for i in range(1, len(seq)+1):
        if x < seq[i-1]:
            return i-1
        elif seq[i-1]<x<seq[i]:
            return i
        return i

Task: Sequential Search


def search(x, seq):
    for i in range(1, len(seq)+1):
        if x < seq[i-1]:
            return i-1
        elif seq[i-1]<x<seq[i]:
            return i
    return i

Task: Sequential Search


def search(x, seq):
    counter = 0
    for i in range(1, len(seq)+1):
        if x < seq[i-1]:
            counter = i-1
        elif seq[i-1]<x<seq[i]:
            counter = i
        counter = i
    return counter

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    for i in range(1, len(seq)+1):
        if x < seq[i-1]:
            return i-1
        elif seq[i-1]<x<=seq[i]:
            return i
    return i

Task: Sequential Search


def search(x, seq):
    for i in range(1, len(seq)+1):
        if x < seq[i-1]:
            return i-1
        elif seq[i-1]<x<=seq[i]:
            return i
    return len(seq)+1

Task: Sequential Search


def search(x, seq):
    for i in range(1, len(seq)+1):
        if x < seq[i-1]:
            return i-1
        elif seq[i-1]<x<=seq[i]:
            return i
        return len(seq)+1

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x < seq[i]:
            return i
        elif seq[i] == seq[-1] and seq[i]<x:
            return i+1
        elif seq[i]<x<=seq[i+1]:
            return i
    return len(seq)+1

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x < seq[i]:
            return i
        elif seq[i] == seq[-1]:
            return i+1
        elif seq[i]<x<=seq[i+1]:
            return i
    return len(seq)+1

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x < seq[i]:
            return i
        elif seq[i] == seq[-1] and seq[i]<x:
            return i+1
        elif seq[i]<x<=seq[i+1]:
            return i+1

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return False
    else:
        for i in range(len(seq)):
            if x < seq[i]:
                return i
            elif seq[i]<x:
                return i+1

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x < seq[i]:
            return i
        elif seq[i]<x:
            return i+1
        elif seq[i]<x<=seq[i+1]:
            return i+1

Task: Sequential Search


def search(x, seq):
    newseq = list(seq)
    sortlist = []
    if newseq[-1] < x:
        return len(newseq)
    while x not in sortlist and newseq:
        start = newseq[0]
        if x <= start:
            sortlist.append(x)
        else:
            sortlist.append(start)
            newseq.pop(0)
    sortlist.extend(newseq)
    for pos, elem in enumerate(sortlist):
        if elem == x:
            return pos

Task: Sequential Search


def search(x, seq):
    if seq == () or seq == []:
        return 0
    elif newseq[-1] < x:
        return len(newseq)

    newseq = list(seq)
    sortlist = []
    while x not in sortlist and newseq:
        start = newseq[0]
        if x <= start:
            sortlist.append(x)
        else:
            sortlist.append(start)
            newseq.pop(0)
    sortlist.extend(newseq)
    for pos, elem in enumerate(sortlist):
        if elem == x:
            return pos

Task: Sequential Search


def search(x, seq):
    if seq == () or seq == []:
        return None
    elif x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    for i, elem in enumerate(seq):
            if x <= elem:
                return i

Task: Sequential Search


def search(x, seq):
    a = list(enumerate(seq))
    for item in a:
        if x <= item[1]:
            return item[0]
    if x > seq[-1]:
        return len(seq)

Task: Sequential Search


def search(x, seq):
    if x < seq[0]:
        return 0
    elif x > seq[len(seq)-1]:
        return len(seq)
    counter = 0
    for i in seq:
        counter = counter + 1
        if x > seq[counter]:
            continue
        elif x <= seq[counter]:
            return counter

Task: Sequential Search


def search(x, seq):
    if x > seq[-1]:
        return len(seq)
    else:
        for num in range(len(seq)):
            if x > seq[num]:
                continue
            elif x <= seq[num]:
                return num
    return 0

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return 0
    elif x > seq[-1]:
        return len(seq)
    else:
        for num in range(len(seq)):
            if x > seq[num]:
                continue
            elif x <= seq[num]:
                return num
    return 0

Task: Sequential Search


def search(x, seq):
    if seq == () or []:
        return 0
    elif x > seq[-1]:
        return len(seq)
    else:
        for num in range(len(seq)):
            if x > seq[num]:
                continue
            elif x <= seq[num]:
                return num
    return 0

Task: Sequential Search


def search(x, seq):
    for i in range(0, len(seq)):
        if seq[i] < x:
            continue
        elif seq[len(seq) - 1] < x:
            return len(seq)
        else:
            return i

Task: Sequential Search


def search(x, seq):
    for i in seq:
        if x <= i:
            return seq.index(i)
        elif x > max(seq):
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in seq:
        if len(seq) == 0:
	        return 0
        elif x <= i:
            return seq.index(i)
        elif x > max(seq):
            return len(seq)

Task: Sequential Search


def search(x, seq):
    if type(seq) == tuple:
        seq = list(seq)
        seq.append(x)
        sorted(seq)
        seq.index(x)

Task: Sequential Search


def search(x, seq):
    if type(seq) == tuple:
        seq = list(seq)
        seq.append(x)
        sorted(seq)
        return seq.index(x)

Task: Sequential Search


def search(x, seq):
    if type(seq) == tuple:
        seq = list(seq)
        seq.append(x)
        sorted(seq)
        return seq.index(x)

    elif type(seq) == list:
        seq.append(x)
        sorted(seq)
        return seq.index(x)

Task: Sequential Search


def search(x, seq):
    for i in range(0,len(seq)):
        if x<seq[i]:
            return print(i)
        else:
            return print(len(seq))

Task: Sequential Search


def search(x, seq):
    for i in range(0,len(seq)):
        if x<seq[i]:
            return i
            break
        elif x==seq[i]:
            return i
            break
        elif x>seq[len(seq)-1]:
            return len(seq)
            break

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if x == elem:
            return i
        elif x < elem:
            return i
        elif x > seq[-1]:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(0,len(seq)):
        if len(seq)==0:
            return 0
        elif x<seq[i]:
            return i
        elif x==seq[i]:
            return i
        elif x>seq[len(seq)-1]:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if seq == ():
            return 0
        elif x == elem:
            return i
        elif x < elem:
            return i
        elif x > seq[-1]:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(0,len(seq)):
        if len(seq)==0:
            return False
        elif x<seq[i]:
            return i
        elif x==seq[i]:
            return i
        elif x>seq[len(seq)-1]:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return 0
    for i, elem in enumerate(seq):
        if x == elem:
            return i
        elif x < elem:
            return i
        elif x > seq[-1]:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    elif x >= seq[-1]:
        return len(seq)
    else:
        for i, elem in enumerate(seq):
            if elem >= x:
                return i

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x<= seq[i]:
            a=i
            break
        elif x> seq[len(seq)-1]:
            a=len(seq)
    return a

Task: Sequential Search


def search(x, seq):
    for i in seq:
        if x<i:
            return seq.index(i)
        elif x == i:
            return seq.index(i)
        elif x>seq[-1]:
            return (seq.index(seq[-1]))+1

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        pos = len(seq)
        if x <= seq[i]:
            pos = i
            break
    return pos

Task: Sequential Search


def search(x, seq):
    if seq:
        for i in range(len(seq)):
            pos = len(seq)
            if x <= seq[i]:
                pos = i
                break
        return pos
    else:
        return seq

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    for count, ele in enumerate(seq):
        if x<=ele:
            return count

    for ele in seq:
        if x>ele:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq==[]:
        return 0
    for count, ele in enumerate(seq):
        if x<=ele:
            return count
    for ele in seq:
        if x>ele:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq==[]or():
        return 0
    for count, ele in enumerate(seq):
        if x<=ele:
            return count
    for ele in seq:
        if x>ele:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for index, value in enumerate(seq):
        if x <= value:
            return index

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x<=seq[i]:
            return i
    return i+1

Task: Sequential Search


def search(x, seq):
    if seq==():
        return 0
    else:
        for i in range(len(seq)):
            if x<=seq[i]:
                return i
        return i+1

Task: Sequential Search


def search(x, seq):
    if x <= seq[0]:
        return 0
    for i in range(len(seq)-1):
        if seq[i] <= x <= seq[i+1]:
            return i + 1
    return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return 0
    if x <= seq[0]:
        return 0
    for i in range(len(seq)-1):
        if seq[i] <= x <= seq[i+1]:
            return i + 1
    return len(seq)

Task: Sequential Search


def search(x, seq):
    count = 0
    for i in range (0, len(seq)):
        if seq[count] < x:
            count += 1
    return count if seq[-1] > x else len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == () or seq == []:
        return 0
    else:
        count = 0
        for i in range (0, len(seq)):
            if seq[count] < x:
                count += 1
        return count if seq[-1] > x else len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == () or seq == []:
        return None
    else:
        count = 0
        for i in range (0, len(seq)):
            if seq[count] < x:
                count += 1
        return count if seq[-1] > x else len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == () or seq == []:
        return 0
    else:
        count = 0
        for i in range (0, len(seq)):
            if seq[i] > x:
                return i
            elif seq[-1] < x:
                return len(seq)

Task: Sequential Search


def search(x, seq):
    if x<=seq[0]:
        return 0
    if x>seq[-1]:
        return len(seq)
    else:
        for i,elem in enumerate(seq):
            if x>elem and x<=seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    if seq==[] or x<=seq[0]:
        return 0
    if x>seq[-1]:
        return len(seq)
    else:
        for i,elem in enumerate(seq):
            if x>elem and x<=seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    if seq==[] or x<=seq[0]:
        return 0
    elif x>seq[-1]:
        return len(seq)
    else:
        for i,elem in enumerate(seq):
            if x>elem and x<=seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    if seq==() or x<=seq[0]:
        return 0
    elif x>seq[-1]:
        return len(seq)
    else:
        for i,elem in enumerate(seq):
            if x>elem and x<=seq[i+1]:
                return i+1

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    for i in range (len(seq)):
        if x < seq[i]:
            return i
        elif x ==seq[i]:
            return i
        else:
            continue
    return i + 1

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return ()
    else:
        for i in range (len(seq)):
            if x < seq[i]:
                return i
            elif x ==seq[i]:
                return i
            else:
                continue
        return i + 1

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return ()
    else:
        for i in range (len(seq)):
            if x < seq[i]:
                return i
            elif x ==seq[i]:
                return i
            else:
                continue
    return i + 1

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return 0
    else:
        for i in range (len(seq)):
            if x < seq[i]:
                return i
            elif x ==seq[i]:
                return i
            else:
                continue
    return i + 1

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)-1):
        if x > seq[i] and x <= seq[i+1]:
            return i+1
    return None

Task: Sequential Search


def search(x, seq):
    if x <= seq[0]:
        return 0
    elif x >= seq[-1]:
        return len(seq)
    else:
        for i in range(len(seq)-1):
            if x > seq[i] and x <= seq[i+1]:
                return i+1
        return None

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    elif x <= seq[0]:
        return 0
    elif x >= seq[-1]:
        return len(seq)
    else:
        for i in range(len(seq)-1):
            if x > seq[i] and x <= seq[i+1]:
                return i+1
        return None

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    elif x <= seq[0]:
        return 0
    elif x >= seq[-1]:
        return len(seq)
    else:
        for i in seq:
            if x < i:
                return seq.index(i)
        return None

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    elif x <= seq[0]:
        return 0
    elif x >= seq[-1]:
        return len(seq)
    else:
        for i in seq:
            if x <= i:
                return seq.index(i)
        return None

Task: Sequential Search


def search(x, seq):
    for i,j in enumerate(seq[:len(seq)-1]):
        if x < seq[0]:
            return 0
        elif x > j and x <= seq[i+1]:
            return i+1
        elif x > seq[len(seq)-1]:
            return len(seq)
        else:
            continue

Task: Sequential Search


def search(x, seq):
    for i,j in enumerate(seq[:len(seq)-1]):
        if seq == []:
            return 0
        elif x < seq[0]:
            return 0
        elif x > j and x <= seq[i+1]:
            return i+1
        elif x > seq[len(seq)-1]:
            return len(seq)
        else:
            continue

Task: Sequential Search


def search(x, seq):
    for i,j in enumerate(seq[:len(seq)-1]):
        if seq == ():
            return 0
        elif x < seq[0]:
            return 0
        elif x > j and x <= seq[i+1]:
            return i+1
        elif x > seq[len(seq)-1]:
            return len(seq)
        else:
            continue

Task: Sequential Search


def search(x, seq):
    if seq == () or x <= seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    else:
        for i,j in enumerate(seq[:len(seq)-1]):
            if x > j and x <= seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    if seq == () or x <= seq[0] or seq == []:
        return 0
    elif x > seq[-1]:
        return len(seq)
    else:
        for i,j in enumerate(seq[:len(seq)-1]):
            if x > j and x <= seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    n = len(seq)
    if seq ==():
        return 0
    for i in range(0,n):
        currentvalue = seq[i]
        position = i
        if position >= 0 and x>currentvalue:
            position = i+1
        elif position >= 0 and x<= currentvalue:
            return position
    return position

Task: Sequential Search


def search(x, seq):
    if x >= seq[-1]:
        return len(seq)
    else:
        for i, elem in enumerate(seq):
            if elem >= x:
                return i
    return

Task: Sequential Search


def search(x, seq):
    if seq == []:
        return 0
    elif x >= seq[-1]:
        return len(seq)
    else:
        for i, elem in enumerate(seq):
            if elem >= x:
                return i
    return

Task: Sequential Search


def search(x, seq):
    if seq == [] or ():
        return 0
    elif x >= seq[-1]:
        return len(seq)
    else:
        for i, elem in enumerate(seq):
            if elem >= x:
                return i
    return

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    elif x >= seq[-1]:
        return len(seq)
    else:
        for i, elem in enumerate(seq):
            if elem >= x:
                return i
    return

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    elif x >= seq[-1]:
        return len(seq)
    else:
        for i, elem in enumerate(seq):
            if elem >= x:
                return i

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    elif x >= seq[-1]:
        return len(seq)
    else:
        for i, elem in enumerate(seq):
            if elem > x:
                return i

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    elif x >= seq[-1]:
        return len(seq)
    else:
        for i, elem in enumerate(seq):
            if x <= elem:
                return i-1

Task: Sequential Search


def search(x, seq):
    if x <= seq[0]:
        return 0
    else:
        for i in range(len(seq)):
            if seq[i] < x <= seq[i+1]:
                return i+1
        return len(seq)

Task: Sequential Search


def search(x, seq):
    if x <= seq[0]:
        return 0
    else:
        for i in range(len(seq)-1):
            if seq[i] < x <= seq[i+1]:
                return i+1
        return len(seq)

Task: Sequential Search


def search(x, seq):
    if x <= seq[0] or not seq:
        return 0
    else:
        for i in range(len(seq)-1):
            if seq[i] < x <= seq[i+1]:
                return i+1
        return len(seq)

Task: Sequential Search


def search(x, seq):
    if x <= seq[0] or seq == 0:
        return 0
    else:
        for i in range(len(seq)-1):
            if seq[i] < x <= seq[i+1]:
                return i+1
        return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == 0:
        return 0
    elif x <= seq[0]:
        return 0
    else:
        for i in range(len(seq)-1):
            if seq[i] < x <= seq[i+1]:
                return i+1
        return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x <= seq[i] and i == 0:
            return 0
        elif seq[i-1] < x <= seq[i]:
            return i
        elif x > seq[i] and i == len(seq)-1:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if len(seq) == 0:
            return 0
        elif x <= seq[i] and i == 0:
            return 0
        elif seq[i-1] < x <= seq[i]:
            return i
        elif x > seq[i] and i == len(seq)-1:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if i == 0 and x < elem:
            return 0
        elif x == elem:
            return i
        elif x < elem:
            return i
        elif x > seq[-1]:
            return len(seq)

Task: Sequential Search


def search(x, seq):

    for i,elem in enumerate(sort):

        if elem==x:

            return i

Task: Sequential Search


def search(x, seq):

    for i,elem in enumerate(seq):

        if elem==x:

            return i

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if len(seq) == 0:
            return 0
        elif i == 0 and x < elem:
            return 0
        elif x <= elem:
            return i
        elif i == len(seq) - 1:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i,elem in enumerate(seq):
        if x > elem:
            continue
        return i
    return i+1

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)-1):
        if seq[i] < x:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)-1):
        if seq[i] >= x:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    n=[]
    seq = list(seq)
    a= seq.copy()
    d = 0
    for i in a:
        if i<x:
            n.append(i)
            seq.remove(i)
        elif i == x:
            n.append(i)
            n.append(x)
            n.extend(seq)
            break
        else:
            n.append(x)
            n.extend(seq)
            break
    count = list(enumerate(n))
    for b in count:
        d+=1
        if b[1] == x:
            return b[0]
        elif d==len(count):
            return d

Task: Sequential Search


def search(x, seq):
    n=[]
    seq = list(seq)
    a= seq.copy()
    d = 0
    if seq == ():
        return 0
    for i in a:
        if i<x:
            n.append(i)
            seq.remove(i)
        elif i == x:
            n.append(i)
            n.append(x)
            n.extend(seq)
            break
        else:
            n.append(x)
            n.extend(seq)
            break
    count = list(enumerate(n))
    for b in count:
        d+=1
        if b[1] == x:
            return b[0]
        elif d==len(count):
            return d

Task: Sequential Search


def search(x, seq):
    n=[]
    seq = list(seq)
    a= seq.copy()
    d = 0
    if seq == () or []:
        return 0
    for i in a:
        if i<x:
            n.append(i)
            seq.remove(i)
        elif i == x:
            n.append(i)
            n.append(x)
            n.extend(seq)
            break
        else:
            n.append(x)
            n.extend(seq)
            break
    count = list(enumerate(n))
    for b in count:
        d+=1
        if b[1] == x:
            return b[0]
        elif d==len(count):
            return d

Task: Sequential Search


def search(x, seq):
    n=[]
    seq = list(seq)
    a= seq.copy()
    d = 0
    for i in a:
        if a == ():
            return 0
        if i<x:
            n.append(i)
            seq.remove(i)
        elif i == x:
            n.append(i)
            n.append(x)
            n.extend(seq)
            break
        else:
            n.append(x)
            n.extend(seq)
            break
    count = list(enumerate(n))
    for b in count:
        d+=1
        if b[1] == x:
            return b[0]
        elif d==len(count):
            return d

Task: Sequential Search


Task: Sequential Search


#def search(x, seq):
#    #    return

def search(val,seq):
    if val <= seq[0]:
        position = 0
    elif val >= seq[-1]:
        position = len(seq)
    else:
        for item in seq:
            if val <= item:
                position = seq.index(item)-1
    return position

Task: Sequential Search


def search(x, seq):
    enumerated_list=enumerate(seq)
    for i,elem in enumerated_list:
        if x<elem:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x <= seq[i]:
            return seq.index(seq[i])
        elif seq[-1] <  x:
            return seq.index(seq[-1])+1

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x <= seq[i]:
            return seq.index(seq[i])
        elif seq[-1] <  x:
            return seq.index(seq[-1])+1
        else:
            return 0

Task: Sequential Search


def search(x, seq):
    for a,b in enumerate(seq):
        if x<=b:
            return a
    for i in seq:
        if x>i:
            return a+1

Task: Sequential Search


def search(x, seq):
    if seq==[]:
        return 0
    for a,b in enumerate(seq):
        if x<=b:
            return a
    for i in seq:
        if x>i:
            return a+1

Task: Sequential Search


def search(x, seq):
    for a,b in enumerate(seq):
        if eq==[]:
            return a
        if x<=b:
            return a
    for i in seq:
        if x>i:
            return a+1

Task: Sequential Search


def search(x, seq):
    count = 0
    if x <= seq[0]:
        return 0
    elif x > seq[len(seq)-1]:
        return len(seq)
    else:
        while x > seq[count]:
            count += 1
        return count

Task: Sequential Search


def search(x, seq):
    count = 0
    if x <= seq[0] or not seq:
        return 0
    elif x > seq[len(seq)-1]:
        return len(seq)
    else:
        while x > seq[count]:
            count += 1
        return count

Task: Sequential Search


def search(x, seq):
    count = 0
    if x <= seq[0] or seq == () or seq == []:
        return 0
    elif x > seq[len(seq)-1]:
        return len(seq)
    else:
        while x > seq[count]:
            count += 1
        return count

Task: Sequential Search


def search(x, seq):
    if seq==():
        return 0
    for a,b in enumerate(seq):
        if x<=b:
            return a
    for i in seq:
        if x>i:
            return a+1

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)-1):
        if x<=seq[0]:
            return 0
        if seq[i]<=x<=seq[i+1]:
            return i+1
        if x>=seq[-1]:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq==():
        return 0
    for i in range(len(seq)-1):
        if x<=seq[0]:
            return 0
        if seq[i]<=x<=seq[i+1]:
            return i+1
        if x>=seq[-1]:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    if len(seq)==0:
        return 0
    for i in range(len(seq)-1):
        if x<=seq[0]:
            return 0
        if seq[i]<=x<=seq[i+1]:
            return i+1
        if x>=seq[-1]:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x<=seq[i]:break
        if i==len(seq)-1: i+=1
    return i

Task: Sequential Search


def search(x, seq):
    if len(seq)==0:
        return 0
    if len(seq)==1:
        if x>=seq[0]:
            return 1
        elif x<seq[0]:
            return 0
    for i in range(len(seq)-1):
        if x<=seq[0]:
            return 0
        if seq[i]<=x<=seq[i+1]:
            return i+1
        if x>=seq[-1]:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq==() or []:
        return 0
    for i in range(len(seq)):
        if x<=seq[i]:break
        if i==len(seq)-1: i+=1
    return i

Task: Sequential Search


def search(x, seq):
    for element in seq:
        if x <= element:
            return list(seq).index(element)
        else:
            continue

Task: Sequential Search


def search(x, seq):
    for element in seq:
        if x <= element:
            return list(seq).index(element)
        elif x >= max(seq):
            return (list(seq).index(max(seq)))+1

Task: Sequential Search


def search(x, seq):
    for element in seq:
        if x <= element:
            return list(seq).index(element)
        elif x >= max(seq):
            return (list(seq).index(max(seq)))+1
        elif seq == ():
            return ()

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return ()
    else:
        for element in seq:
            if x <= element:
                return list(seq).index(element)
            elif x >= max(seq):
                return (list(seq).index(max(seq)))+1

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return None
    else:
        for element in seq:
            if x <= element:
                return list(seq).index(element)
            elif x >= max(seq):
                return (list(seq).index(max(seq)))+1

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return 0
    else:
        for element in seq:
            if x <= element:
                return list(seq).index(element)
            elif x >= max(seq):
                return (list(seq).index(max(seq)))+1

Task: Sequential Search


def search(x, seq):
    if list(seq) == ():
        return 0
    else:
        for element in seq:
            if x <= element:
                return list(seq).index(element)
            elif x >= max(seq):
                return (list(seq).index(max(seq)))+1

Task: Sequential Search


def search(x, seq):
    if list(seq) == ():
        return 0
    elif seq == ():
        return 0
    else:
        for element in seq:
            if x <= element:
                return list(seq).index(element)
            elif x >= max(seq):
                return (list(seq).index(max(seq)))+1

Task: Sequential Search


def search(x, seq):
    if list(seq) == []:
        return 0
    elif seq == ():
        return 0
    else:
        for element in seq:
            if x <= element:
                return list(seq).index(element)
            elif x >= max(seq):
                return (list(seq).index(max(seq)))+1

Task: Sequential Search


def search(x, seq):
    if list(seq) == []:
        return 0
    else:
        for element in seq:
            if x <= element:
                return list(seq).index(element)
            elif x >= max(seq):
                return (list(seq).index(max(seq)))+1

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if x > seq[-1]:
            return len(seq)
        elif  x > elem:
            continue
        else:
            return i

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if len(seq) == 0:
            return 0
        elif x > seq[-1]:
            return len(seq)
        elif  x > elem:
            continue
        else:
            return i

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if seq == ():
            return 0
        elif x > seq[-1]:
            return len(seq)
        elif  x > elem:
            continue
        else:
            return i

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if seq == ():
            return 0
        elif seq == []:
            return 0
        elif x > seq[-1]:
            return len(seq)
        elif  x > elem:
            continue
        else:
            return i

Task: Sequential Search


def search(x, seq):
    return
def search(x, seq):
    if list(seq) == []:
        return 0
    else:
        for element in seq:
            if x <= element:
                return list(seq).index(element)
            elif x >= max(seq):
                return (list(seq).index(max(seq)))

Task: Sequential Search


def search(x, seq):
    for i in seq:
        if x>i:
            continue
        else:
            return (seq.index(i))-1

Task: Sequential Search


def search(x, seq):
    for i in seq:
        if x>i:
            continue
        else:
            return ((seq).index(i))-1

Task: Sequential Search


def search(x, seq):
    for i in seq:
        if x>i:
            continue
    return seq.index(i)-1

Task: Sequential Search


def search(x, seq):
    count==0
    while count<len(seq):
        if seq[count]<x:
            count+=1
    return count

Task: Sequential Search


def search(x, seq):
    if x<0:
        return 0
    elif x<max(seq):
        for i in range(len(seq)):
            if (x>=seq[i]) and (x<=seq[i+1]):
                return i+1
    else:
        return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq ==[]:
        return 0
    if x<0:
        return 0
    elif x<max(seq):
        for i in range(len(seq)):
            if (x>=seq[i]) and (x<=seq[i+1]):
                return i+1
    else:
        return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq ==[]:
        return 0
    elif x<0:
        return 0
    elif x<max(seq):
        for i in range(len(seq)):
            if (x>=seq[i]) and (x<=seq[i+1]):
                return i+1
    else:
        return len(seq)

Task: Sequential Search


def search(x, seq):
    n = len(seq)
    for counter in range(n):
        if x > seq[n-1]:
            result = n
            break
        elif seq[counter] >= x:
            result = counter
            break
        else:
            continue
    return result

Task: Sequential Search


def search(x, seq):
    count==0
    while count<len(seq):
        if x>seq[count]:
            count+=1
            continue
        else:
            return count-1
            break
    return len(seq)

Task: Sequential Search


def search(x, seq):
    count=0
    while count<len(seq):
        if x>seq[count]:
            count+=1
            continue
        else:
            return count-1
            break
    return len(seq)

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
        elif x > seq[len(seq)-1]:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    count=0
    while count<len(seq):
        if x>seq[count]:
            count+=1
            continue
        else:
            return count-1
    return len(seq)

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if seq == ():
            return (i,)
        elif seq == []:
            return [i,]
        elif x <= elem:
            return i
        elif x > seq[len(seq)-1]:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if seq == ():
            return (i,)
        elif seq == []:
            return [i]
        elif x <= elem:
            return i
        elif x > seq[len(seq)-1]:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    count=0
    while count<len(seq):
        if x>seq[count]:
            count+=1
            continue
        else:
            if count!=0:
                return count-1
            else:
                return 0
    return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in len(range(seq)):
        if x>seq[i]:
            return i

Task: Sequential Search


def search(x, seq):
    l=len(seq)
    if len(seq)==0:
        return 0
    elif x<=seq[0]:
        return 0
    elif x>=seq[l-1]:
        return l
    else:
        for i in range (l):
            if x>=seq[i] and x<=seq[i+1]:
                return i+1
            else:
                continue

Task: Sequential Search


def search(x, seq):
    for i,elem in enumerate(seq):
        if x < seq[-1]:
            if x > elem:
                continue
            elif x < elem and type(seq) == tuple:
                seq = seq[:i] + (x,) + seq[i:]
            elif x < elem and type(seq) == list:
                seq = seq[:i] + [x,] + seq[i:]
        elif x > seq[-1]:
            if type(seq) == tuple:
                seq += (x,)
            elif type(seq) == list:
                seq += [x,]
    return seq.index(x)

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return (x,)
    elif seq == []:
        return [x,]
    else:
        for i,elem in enumerate(seq):
            if x < seq[-1]:
                if x > elem:
                    continue
                elif x < elem and type(seq) == tuple:
                    seq = seq[:i] + (x,) + seq[i:]
                elif x < elem and type(seq) == list:
                    seq = seq[:i] + [x,] + seq[i:]
            elif x > seq[-1]:
                if type(seq) == tuple:
                    seq += (x,)
                elif type(seq) == list:
                    seq += [x,]
        return seq.index(x)

Task: Sequential Search


def search(x, seq):
    l=len(seq)
    if x<=seq[0]:
        return 0
    elif x>=seq[l-1]:
        return l+1
    else:
        for i in range (l):
            if x>=seq[i] and x<=seq[i+1]:
                return i+1
            else:
                continue

Task: Sequential Search


def search(x, seq):
    l=len(seq)
    if x<=seq[0]:
        return 0
    elif x>=seq[l-1]:
        return l
    else:
        for i in range (l):
            if x>=seq[i] and x<=seq[i+1]:
                return i+1
            else:
                continue

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    for i in range(len(seq) - 1):
        if seq[i] < x < seq[i+1]:
            return i+1

Task: Sequential Search


def search(x, seq):
    if x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    else:
        for i in range(len(seq) - 1):
            if seq[i] < x < seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    if x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    else:
        for i in range(len(seq) - 1):
            if seq[i] == x:
                return i
            elif seq[i] < x < seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    if x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    elif seq == []:
        return 0
    else:
        for i in range(len(seq) - 1):
            if seq[i] == x:
                return i
            elif seq[i] < x < seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    if x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    elif seq == [] or seq == ():
        return 0
    else:
        for i in range(len(seq) - 1):
            if seq[i] == x:
                return i
            elif seq[i] < x < seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    if x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    elif len(seq) == 0:
        return 0
    else:
        for i in range(len(seq) - 1):
            if seq[i] == x:
                return i
            elif seq[i] < x < seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    if not seq:
        return 0
    elif x < seq[0]:
        return 0
    elif x > seq[-1]:
        return 0
    else:
        for i in range(len(seq) - 1):
            if seq[i] == x:
                return i
            elif seq[i] < x < seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    if not seq:
        return 0
    elif x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    else:
        for i in range(len(seq) - 1):
            if seq[i] == x:
                return i
            elif seq[i] < x < seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    index = 0
    def helper(index):
        if not seq:
            return 0
        elif x <= seq[index]:
            return index
        else:
            if index + 1 >= len(seq):
                return index + 1
            else:
                return helper(index+1)

Task: Sequential Search


def search(x, seq):

    seq = list(seq)
    max_value = max(seq)
    for i,elem in enumerate(seq):
        if x > max_value:
            seq.insert(seq.index(max_value) + 1,x)
            break
        elif x<elem:
            y = max(0,i)
            seq.insert(y,x)
            break
    return seq.index(x)

Task: Sequential Search


def search(x, seq):
    if seq == []:
        return 0
    elif x<seq[0]:
        return 0
    elif x>seq[0] and len(seq) == 1:
        return 1
    else:
        for i in range(len(seq)-1):
            if seq[i] <= x <= seq[i+1]:
                return i+1
        return len(seq)

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
        if i == (len(seq)-1):
            return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return 0
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
        if i == (len(seq)-1):
            return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == []:
        return 0
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
        if i == (len(seq)-1):
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
        elif i == len(seq) - 1 and x > elem:
            return i + 1

Task: Sequential Search


def search(x, seq):
    for i in len(seq):
        if x <= seq[i]:
            return i
    #

Task: Sequential Search


def search(x, seq):
    for i in len(seq):
        if x <= seq[i]:
            return i
    return len(seq)+1
    #

Task: Sequential Search


def search(x, seq):

    for i, elem in enumerate(seq):
        if x <= elem:
            return i
        else:
            return len(seq)

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x <= seq[i]:
            return i
    return len(seq)+1
    #

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return -1
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
    return i+1

Task: Sequential Search


def search(x, seq):
    result = None
    for i, elem in enumerate(seq):
        if x <= elem:
            result = i
            break

        else:
            result = len(seq)
    return result

Task: Sequential Search


def search(x, seq):
    result = None
    if seq == () or seq == []:
        return result

    for i, elem in enumerate(seq):
        if x <= elem:
            result = i
            break

        else:
            result = len(seq)
    return result

Task: Sequential Search


def search(x, seq):
    if x <= seq[0]:
        return 0
    elif x >= seq[len(seq)-1]:
        return len(seq)
    else:
        for i, elem in enumerate(seq):
            if elem <= x <= seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    if x <= seq[0]:
        return 0
    elif x >= seq[len(seq)-1]:
        return len(seq)
    elif seq == [] or ():
        return 0
    else:
        for i, elem in enumerate(seq):
            if elem <= x <= seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    if x <= seq[0]:
        return 0
    elif x >= seq[len(seq)-1]:
        return len(seq)
    elif seq == ():
        return 0
    else:
        for i, elem in enumerate(seq):
            if elem <= x <= seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    if seq == () or seq == []:
        return 0
    elif x <= seq[0]:
        return 0
    elif x >= seq[len(seq)-1]:
        return len(seq)
    else:
        for i, elem in enumerate(seq):
            if elem <= x <= seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    if seq == () or seq == []:
        return 0
    else:
        for i, elem in enumerate(seq):
            if x <= elem:
                return i
            elif x >= seq[len(seq)-1]:
                return len(seq)

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
    return i+1

Task: Sequential Search


def search(x, seq):
    n = len(seq)
    for i in range(0,n):
        currentvalue = seq[i]
        position = i
        if position >= 0 and x>currentvalue:
            position = i+1
        elif position >= 0 and x<= currentvalue:
            return position
    return position

Task: Sequential Search


def search(x, seq):
    if x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    else:
        for i in seq:
            if x > i:
                continue
            else:
                return seq.index(i)

Task: Sequential Search


def search(x, seq):
    if x <= seq[-1]:
        for i in range(len(seq)):
            if seq[i] < x:
                continue
            else:
                return i
    else:
        return len(seq)

Task: Sequential Search


def search(x, seq):
    if list(seq) == []:
        return 0
    else:
        for element in seq:
            if x <= element:
                return list(seq).index(element)
            elif x == element:
                return (list(seq).index(element))-1
            elif x >= max(seq):
                return (list(seq).index(max(seq)))+1

Task: Sequential Search


def search(x, seq):
    if list(seq) == []:
        return 0
    else:
        for element in seq:
            if x <= element:
                return list(seq).index(element)
            elif x == element:
                return list(seq).index(element)
            elif x >= max(seq):
                return (list(seq).index(max(seq)))+1

Task: Sequential Search


def search(x, seq):
    n = len(seq)
    for i in range(0,n):
        currentvalue = seq[i]
        position = i
        if position >= 0 and x>currentvalue:
            position = i+1
        elif position >= 0 and x<= currentvalue:
            return position
        elif seq==():
            return 0
    return position

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    for i in seq:
        if x < seq[i]:
            return i

Task: Sequential Search


def search(x, seq):
    for i in seq:
        if x <= seq[i]:
            return i

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x <= seq[i]:
            return i

Task: Sequential Search


def search(x, seq):
    for i in range(len(sorted_seq)):
        if x <= sorted_seq[i]:
            return i
        else:
            return len(sorted_seq)

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x <= seq[i]:
            return i
        else:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x <= seq[i] and x >= seq[i-1]:
            position = i
    return position

Task: Sequential Search


def search(x, seq):
    if x <= seq[0]:
        position = 0
    for i in range(len(seq)):
        if x <= seq[i] and x >= seq[i-1]:
            position = i
    return position

Task: Sequential Search


def search(x, seq):
    if x <= seq[0]:
        position = 0
    for i in range(len(seq)):
        if x <= seq[i] and x > seq[i-1]:
            position = i
    return position

Task: Sequential Search


def search(x, seq):
    if x <= seq[0]:
        position = 0
    for i in range(len(seq)):
        if x <= seq[i] and x > seq[i-1]:
            position = i
        else:
            position = len(seq)
    return position

Task: Sequential Search


def search(x, seq):
    if x <= seq[0]:
        position = 0
    if x >= seq[len(seq) - 1]:
        position = len(seq)
    for i in range(len(seq)):
        if x <= seq[i] and x > seq[i-1]:
            position = i
    return position

Task: Sequential Search


def search(x, seq):
    if seq == [] or seq == ():
        position = 0
    if x <= seq[0]:
        position = 0
    if x >= seq[len(seq) - 1]:
        position = len(seq)
    for i in range(len(seq)):
        if x <= seq[i] and x > seq[i-1]:
            position = i
    return position

Task: Sequential Search


def search(x, seq):
    a = list(enumerate(seq))
    seq = list(seq)
    i = 0
    while i < len(seq):
        if x < seq[i] and i == 0:
            seq.insert(a[i][0], x)
            i = i + 2
        elif x < seq[i] and x > seq[i-1]:
            seq.insert(a[i][0],x)
            i = i + 2
        elif x > seq[len(seq)-1]:
            seq.append(x)
            i = i + 2
        else:
            i = i + 1

    return seq

Task: Sequential Search


def search(x, seq):
    a = list(enumerate(seq))
    seq = list(seq)
    i = 0
    while i < len(seq):
        if x < seq[i] and i == 0:
            return 0
        elif x <= a[i][1] and x >= a[i-1][1]:
            return a[i][0]
        elif x > a[len(seq)-1][1]:
            return len(seq)
        else:
            i = i + 1

    return seq

Task: Sequential Search


def search(x, seq):
    a = list(enumerate(seq))
    seq = list(seq)
    i = 0
    while i < len(seq):
        if seq == []:
            return 0
        if x < seq[i] and i == 0:
            return 0
        elif x <= a[i][1] and x >= a[i-1][1]:
            return a[i][0]
        elif x > a[len(seq)-1][1]:
            return len(seq)
        else:
            i = i + 1

    return seq

Task: Sequential Search


def search(x, seq):
    position=enumerate(seq)
    if x>seq[-1]:
        return len(seq)
    else:
        for i in seq:
            if x<=i:
                for index in position:
                    if index[1]==i:
                        return index[0]

Task: Sequential Search


def search(x, seq):
    enumerated_list =()
    for i, elem in enumerate(seq):
        enumerated_list = enumerated_list + ((i,elem),)

    for number in enumerated_list:
        if x <= number[1]:
            res = number[0]
            break
        else:
            res = len(seq)
    return res

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if seq[i] < x:
            return x
    return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if seq[i] >= x:
            return i
    return i

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if seq[i] >= x:
            return i
        else:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in len(range(seq)):
        if x <= i:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x < seq[0]:
            pos = 0
            break
        elif x <= seq[i]:
            pos = i
            break
        elif x > seq[len(seq) - 1]:
            pos = len(seq)
            break
    return pos

Task: Sequential Search


def search(x, seq):
    if seq[len(seq)-1] < x:
        return len(seq)
    elif seq[0] >= x:
                return 0
    else:
        for i in range(len(seq)-1):
            if seq[i] < x and seq[i+1] >= x:
                return i+1
                break

Task: Sequential Search


def search(x, seq):
    if seq[len(seq)-1] < x:
        return len(seq)
    elif seq[0] >= x or seq == () or seq == []:
                return 0
    else:
        for i in range(len(seq)-1):
            if seq[i] < x and seq[i+1] >= x:
                return i+1
                break

Task: Sequential Search


def search(x, seq):
    if seq[0] >= x or seq == () or seq == []:
                return 0
    elif seq[len(seq)-1] < x:
        return len(seq)
    else:
        for i in range(len(seq)-1):
            if seq[i] < x and seq[i+1] >= x:
                return i+1
                break

Task: Sequential Search


def search(x, seq):
    if seq[0] >= x or seq == () or seq == []:
        return 0
    elif seq[len(seq)-1] < x:
        return len(seq)
    else:
        for i in range(len(seq)-1):
            if seq[i] < x and seq[i+1] >= x:
                return i+1
                break

Task: Sequential Search


def search(x, seq):
    counter = 0
    new_seq = list(seq)
    for element in seq:
        if x <=element:
            return counter
        if x > seq[len(seq)-1]:
            return len(seq)
        else:
            counter += 1
            continue

Task: Sequential Search


def search(x, seq):
    counter = 0
    new_seq = list(seq)
    if seq == ():
        return (x,)
    for element in seq:
        if x <=element:
            return counter
        if x > seq[len(seq)-1]:
            return len(seq)
        else:
            counter += 1
            continue

Task: Sequential Search


def search(x, seq):
    counter = 0
    new_seq = list(seq)
    if seq == ():
        return 0
    for element in seq:
        if x <=element:
            return counter
        if x > seq[len(seq)-1]:
            return len(seq)
        else:
            counter += 1
            continue

Task: Sequential Search


def search(x, seq):
    position = 0
    while position < len(seq)-1:
        if seq[position] == x:
             break
        elif seq[position] > x:
            break
        position = position + 1
    if seq[position] < x:
        position = position + 1
    return position

Task: Sequential Search


def search(x, seq):
    enumerated = list(enumerate(seq))
    if x > max(seq):
        return len(seq)
    else:
        for i in range(len(enumerated)):
            if enumerated[i][1] >= x:
                return enumerated[i][0]
                break

Task: Sequential Search


def search(x, seq):
    enumerated = list(enumerate(seq))
    if seq == ():
        return 0
    elif x > max(seq):
        return len(seq)
    else:
        for i in range(len(enumerated)):
            if enumerated[i][1] >= x:
                return enumerated[i][0]
                break

Task: Sequential Search


def search(x, seq):
    enumerated = list(enumerate(seq))
    if seq == () or []:
        return 0
    elif x > max(seq):
        return len(seq)
    else:
        for i in range(len(enumerated)):
            if enumerated[i][1] >= x:
                return enumerated[i][0]
                break

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x < seq[i]:
            return i
        else:
            continue
    return len(seq)

Task: Sequential Search


def search(x, seq):
    t = 0
    for i in seq:
        if x >= i:
            return t
        t += 1
    return len(seq)-1

Task: Sequential Search


def search(x, seq):
    t = 0
    for i in seq:
        if x >= i:
            t+=1

    return t

Task: Sequential Search


def search(x, seq):
    if x > seq[-1]:
        return len(seq)
    else:
        for i, elem in enumerate(seq):
            if x <= elem:
                return i
            else:
                continue

Task: Sequential Search


def search(x, seq):
    for i in range(0, len(seq) + 1):
        if x < seq[0]:
            return 0
        elif seq[i] < x <= seq[i+1]:
            return i + 1
        elif seq[len(seq)-1] < x:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(0, len(seq) + 1):
        if (x < seq[0]) or (seq == ()):
            return 0
        elif seq[i] < x <= seq[i+1]:
            return i + 1
        elif seq[len(seq)-1] < x:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(0, len(seq) + 1):
        if ((x < seq[0]) or (seq == ())):
            return 0
        elif seq[i] < x <= seq[i+1]:
            return i + 1
        elif seq[len(seq)-1] < x:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(0, len(seq) + 1):
        if x < seq[0]:
            return 0
        elif seq[i] < x <= seq[i+1]:
            return i + 1
        elif seq[len(seq)-1] < x:
            return len(seq)
        elif seq == ():
            return None

Task: Sequential Search


def search(x, seq):
    for i in range(0, len(seq) + 1):
        if seq == ():
            return None
        elif x < seq[0]:
            return 0
        elif seq[i] < x <= seq[i+1]:
            return i + 1
        elif seq[len(seq)-1] < x:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(0, len(seq) + 1):
        if seq == ():
            return 0
        elif x < seq[0]:
            return 0
        elif seq[i] < x <= seq[i+1]:
            return i + 1
        elif seq[len(seq)-1] < x:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(0, len(seq) + 1):
        if len(seq) == 0:
            return None
        elif x < seq[0]:
            return 0
        elif seq[i] < x <= seq[i+1]:
            return i + 1
        elif seq[len(seq)-1] < x:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    if x<seq[0]:
        return 0
    elif x>seq[-1]:
        return len(seq)
    else:
        for i in range(len(seq)-1):
            if x>seq[i] and x<seq[i+1]:
                return i+1
            elif x==seq[i]:
                return i

Task: Sequential Search


def search(x, seq):
    if x<seq[0]:
        return 0
    elif x>seq[-1]:
        return len(seq)
    elif seq is ():
        return 0
    else:
        for i in range(len(seq)-1):
            if x>seq[i] and x<seq[i+1]:
                return i+1
            elif x==seq[i]:
                return i

Task: Sequential Search


def search(x, seq):
    if x<seq[0]:
        return 0
    elif x>seq[-1]:
        return len(seq)
    elif len(seq)==0:
        return 0
    else:
        for i in range(len(seq)-1):
            if x>seq[i] and x<seq[i+1]:
                return i+1
            elif x==seq[i]:
                return i

Task: Sequential Search


def search(x, seq):
    if len(seq)==0:
        return 0
    elif x<seq[0]:
        return 0
    elif x>seq[-1]:
        return len(seq)
    else:
        for i in range(len(seq)-1):
            if x>seq[i] and x<seq[i+1]:
                return i+1
            elif x==seq[i]:
                return i

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x < len[i]:
            continue
        else:
            return i

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x < seq[i]:
            continue

        return i

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x < seq[i]:
            continue
        elif x >= seq[i]:
            return i

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x < seq[i]:
            continue
        elif x >= seq[i]:
            break
    return i

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x >= seq[i]:
            break
        else:
            continue
    return i

Task: Sequential Search


def search(x,seq):
    for i in range(len(seq)):
        if x > seq[i]:
            continue
        elif x <= seq[i]:
            break
    return i

Task: Sequential Search


def search(x,seq):
    for i in range(len(seq)):
        if x > seq[i]:
            continue
        elif x <= seq[i]:
            break
        elif x > max(seq):
            return len(seq)
    return i

Task: Sequential Search


def search(x,seq):
    for i in range(len(seq)):
        if x > seq[i]:
            continue
        elif x <= seq[i]:
            break
        elif x > max(seq):
            return len(seq)+1
    return i

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    for i in range(0, len(seq)):
        no = len(seq)
        if x > seq[i]:
            continue
        elif x <= seq[i]:
            no = i
            break
    return no

Task: Sequential Search


def search(x,seq):
    for i in range(len(seq)):
        if x > max(seq):
            return len(seq)
        elif x > seq[i]:
            continue
        elif x <= seq[i]:
            break

    return i

Task: Sequential Search


def search(x,seq):
    for i in range(len(seq)):
        if len(seq) == 0:
            return 0
        elif x > max(seq):
            return len(seq)
        elif x > seq[i]:
            continue
        elif x <= seq[i]:
            break

    return i

Task: Sequential Search


def search(x, seq):
    if type(seq) == list:
        a = seq.copy()
        a.append(x)
        a.sort()
        for i, elem in enumerate(a):
            if elem == x:
                return i
    else:
        temp_tuple = seq.copy()
        temp_tuple+=(x,)
        for i, elem in enumerate(sorted(temp_tuple)):
            if elem == x:
                return i

Task: Sequential Search


def search(x, seq):
    for i,v in enumerate(seq):
        if x>v and i!=len(seq)-1:
            continue
        elif x>v and i==len(seq)-1:
            return i+1
        else:
            break

    return i

Task: Sequential Search


def search(x, seq):
    if seq==[]or():
        return 0
    for i,v in enumerate(seq):
        if x>v and i!=len(seq)-1:
            continue
        elif x>v and i==len(seq)-1:
            return i+1
        else:
            break

    return i

Task: Sequential Search


def search(x, seq):
    n = len(seq)
    if seq: #if seq is not an empty list/tuple
        for i in range(n):
            next_element = seq[i]
            if x <= next_element:
                return i
        return n

Task: Sequential Search


def search(x, seq):
    seq = []
    n = len(seq)
    if seq: #if seq is not an empty list/tuple
        for i in range(n):
            next_element = seq[i]
            if x <= next_element:
                return i
        return n

Task: Sequential Search


def search(x, seq):
    n = len(seq)
    if seq: #if seq is not an empty list/tuple
        for i in range(n):
            next_element = seq[i]
            if x <= next_element:
                return i
        return n
    else:
        return None

Task: Sequential Search


def search(x, seq):
    for i in range(seq):
        if x<=seq[i]:
            break
    return i

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x<=seq[i]:
            break
    return i

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x<=seq[i]:
            return i
    return i+1

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if len(seq)==0:
            return 0
        elif x<=seq[i]:
            return i
    return i+1

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if not seq:
            return 0
        elif x<=seq[i]:
            return i
    return i+1

Task: Sequential Search


def search(x, seq):
    for i, ele in enumerate(seq, 0):
        if x > ele:
            i += 1
        else:
            break
    return i

Task: Sequential Search


def search(x, seq):
    for i in range(seq):
        if x <= seq[i]:
            return i
        else:
            continue

Task: Sequential Search


def search(x, seq):
    n = len(seq)
    for i in range(n):
        next_element = seq[i]
        if x > next_element:
            return 0
        else:
            return i
    return n

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
        else:
            continue

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if x <= elem:
            return i

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
        elif x > max(seq):
            return i+1

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
        elif x > max(seq):
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if seq == ():
            return 0
        if x <= elem:
            return i
        elif x > max(seq):
            return len(seq)

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if seq == ():
            return None
        if x <= elem:
            return i
        elif x > max(seq):
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if seq == ():
            return 1
        if x <= elem:
            return i
        elif x > max(seq):
            return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return None
    elif seq == []:
        return None
    else:
        next
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
        elif x > max(seq):
            return len(seq)

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x <= seq(i):
            return i
        elif x > seq[-1]:
            return len(seq) + 1

Task: Sequential Search


def search(x, seq):
    for item in seq:
        if x < item:
            return index(item)

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x < seq[i]:
            return i

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x <= seq[i]:
            return i

Task: Sequential Search


def search(x, seq):
    for i in range(len(seq)):
        if x <= seq[i]:
            return i
        else:
            return len(seq)

Task: Sequential Search


def search(x, seq):
    if x <= seq[0]:
        return 0
    for i in range(len(seq)-1):
        if seq[i+1]>=x and x>seq[i]:
            return i+1
    return len(seq)

Task: Sequential Search