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):
    output = 0
    while output < len(seq):
        if x > seq[output]:
            output += 1
        else:
            break
    return output

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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):
   brokeloop=False
   if len(seq)==0:
       return 0
   for i, elem in enumerate(seq):
       if elem>=x:
           brokeloop=True
           break
   if brokeloop==True:
       return i
   else:
        return i+1

Task: Sequential Search


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

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):
    y = len(seq)
    if y == 0 or x < seq[0]:
        return 0
    else:
        for i in range(y-1):
            if x > seq[i] and x <= seq[i+1]:
                return i + 1
        return y

Task: Sequential Search


def search(x, seq):
    if seq==() or 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):
    counter = 0
    while counter < len(seq):
        if x <= seq[counter]:
            return counter
        counter += 1
    return counter

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

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):
    for i,ele in enumerate(seq):
        if x<=ele:    #if x is less/equal to the specific element in the list
            return i   #return the index to be inserted in
    return len(seq)

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if elem == x:
            return i
        elif x > elem:
            continue
        elif x < elem:
            return i
    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)
    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,ele in enumerate(seq):
        if x<=ele:
            return i
    return len(seq)

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):
    if seq == () or 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):
    new = list(enumerate(seq))
    for n in new:
        if x <= n[1]:
            return n[0]
    return len(seq)

Task: Sequential Search


def search(x, seq):
    if not seq:
        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):
    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):
    for index in range(len(seq)):
        if x <= seq[index]:
            return index
    return len(seq)

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    listseq=list(seq)
    n=len(seq)

    for i in listseq:
        if x<=i:
            return listseq.index(i)
    return n

Task: Sequential Search


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

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 seq == () or seq == [] :
        return 0
    for i, elem in enumerate(seq) :
        if x <= elem :
            return i
    return i + 1

Task: Sequential Search


def search(x, seq):
    if not 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 len(seq)==0:
        return 0
    for i in range(len(seq)):
        if x<=seq[i]:
            return i
    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[-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 == () or seq == []:
        return 0
    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):
    index_for_x = 0
    for index, element in enumerate(seq) :
        if element < x:
            index_for_x+=1
        else:
            break
    return index_for_x

Task: Sequential Search


def search(x, seq):
	seq=list(seq)
	if seq==[]:
		return 0
	else:
		for i in seq:
			if x<=i:
				num=seq.index(i)
				break
			else:
				num=len(seq)
	return num

Task: Sequential Search


def search(x, seq):
    y = 0
    for z in seq:
        if x > z:
            y += 1
    return y

Task: Sequential Search


def search(x, seq):
    if len(seq)==0:
        return 0
    for i in range(0,len(seq)):
        if 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 j, elem in enumerate(seq):
        if x<= elem:
            return j
    return len(seq)

Task: Sequential Search


def search(x, seq):
    lst = list(seq)
    if lst == []:
        lst.append(x)
    else:
        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):
    counter=0
    for i in seq:
        if x<= i:
            return counter
        counter+=1
    return counter

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):
    position=0
    for i in range(len(seq)):
        if x>seq[i]:
            position+=1
        else:
            return position
    return position

Task: Sequential Search


def search(x, seq):
    if 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
    if x < seq[0]:
        return 0
    elif x > seq[len(seq)-1]:
        return len(seq)

Task: Sequential Search


def search(x, seq):
    length = len(seq)
    if length == 0: return 0
    elif length == 1: return 0 if x < seq[0] else 1
    else:
        for i in range(length):
            if x <= seq[i]: return i
        return length # x is larger than everything in seq, so x goes to the end

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        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):
    if len(seq) == 0:    #if there is nothing in the sequence, put it as the first part of the column
        return 0
    else:
        for i in range(len(seq)):
            if x > seq[-1]:  #if the digit x is greater than the greatest number in the sequence, return the number of elements in the sequence
                return len(seq)
            elif x <= seq[i]: #to return the number when x is smaller of equals to the i in the loop
                return i
            else:
                continue #goes into a loop until it finds the number that matches the previous answer.

Task: Sequential Search


Task: Sequential Search


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

Task: Sequential Search


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

    return position

Task: Sequential Search


def search(x, seq):
    a = len(seq)
    if a == 0:
        return 0
    if a !=0 and x < seq[0]:
        return 0
    elif a!= 0 and 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):
    a = len(seq)
    if a == 0:
        return 0
    if a !=0 and x < seq[0]:
        return 0
    elif a != 0 and 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):
    i=0
    while i<len(seq):
        if x<=seq[i]:
            break
        i=i+1
    return i

Task: Sequential Search


def search(x,seq):
	counter=0
	y=len(seq)
	while counter<y:
		if x>seq[counter]:
			counter+=1
			continue
		break
	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
    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(value, seq):
	for i in range(len(seq)):
		if value <= seq[i]:
			return i
		else:
			continue
	return len(seq)

Task: Sequential Search


def search(x, seq):
    for i,ele in enumerate(seq):
        if x<=ele:    #if x is less/equal to the specific element in the list
            return i   #return the index to be inserted in
    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 == ():
        return 0
    elif seq == []:
        return 0
    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):
    #Takes in a value x and a sorted sequence seq, and returns the
    #position that x should go to such that the sequence remains sorted
    i =0
    for p in seq:
        if x <= p:
            return i
        i += 1
    return len(seq)

Task: Sequential Search


def search(x, seq):
    holder=0
    for value in seq:
        if x>value:
            holder+=1
    return holder

Task: Sequential Search


def search(x, seq):
    new_seq=list(seq)
    new_seq.append(x)
    sort=[]
    while new_seq:
        smallest=new_seq[0]
        for element in new_seq:
            if element<smallest:
                smallest=element
        new_seq.remove(smallest)
        sort.append(smallest)
    for i,elem in enumerate(sort):
        if elem==x:
            return i

Task: Sequential Search


def search(x, seq):
    if len(seq)==0:
        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 x > seq[i] and x <= seq[i+1]:
                return i+1

Task: Sequential Search


Task: Sequential Search


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

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 seq == () or seq == []:
        return 0
    else:
        for i in range(0,len(seq)):
            if i == 0 and x<seq[0]:
                return 0
            elif i==len(seq)-1 and x>seq[len(seq)-1]:
                return len(seq)
            elif seq[i] <= x and x<= seq[i+1]:
                return i+1

Task: Sequential Search


def search(x, seq):
    total = seq
    counter = 0
    while counter != len(seq):
        if x <= total[counter]:
            break
        else:
            counter += 1
    return counter

Task: Sequential Search


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

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_list = list(seq)
        temp_list.append(x,)
        temp_list.sort()
        for i, elem in enumerate(temp_list):
            if elem == x:
                return i

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
            return 0
    else:
        for i, elem in enumerate(seq):
            if 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):
    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 len(seq) == 0:
        return False
    else:
        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):
    y = 0
    for z in seq:
        if x > z:
            y += 1
    return y

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:
        for i in range(len(seq)):
            if x <= seq[i]:
                return i

Task: Sequential Search


def search(x, seq):
    for k in range(len(seq)):
        if x <= seq[k]:
            return k
        elif x > seq[k]:
            continue
    return len(seq)  # if bigger than the last element

Task: Sequential Search


def search(x, seq):
    if seq == () or seq == []:
        return 0
    elif seq[-1] < x:
        return len(seq)
    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):
    for i, val in enumerate(seq):
        if x <= val:
            return i
    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)
    for i, elem in enumerate(seq):
            if x <= elem:
                return i

Task: Sequential Search


def search(x, seq):
    listseq=list(seq)
    n=len(seq)

    for i in listseq:
        if x<=i:
            return listseq.index(i)
    return n

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 pos,ele in enumerate(seq):
        if ele >= x:
            return pos
    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)
    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 len(seq)==0:
        return 0
    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 len(seq) == 0:
        return 0
    elif 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 seq == () or 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


Task: Sequential Search


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

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 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)):
            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):
    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 len(seq) == 0:
        return 0
    else:
        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):

    count = 0

    for i in seq:
        if x > i:
            count += 1
    return count

    return

Task: Sequential Search


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

Task: Sequential Search


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

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, y in enumerate(seq):
        if x <= y:
            return i
    if seq == [] or seq == ():
        return 0
    else:
        return 1+i

Task: Sequential Search


def search(x, seq):
    if seq == () or 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):
    if seq == ():
        return 0
    elif 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):
    lst = []
    for i, elem in enumerate(seq):
        lst.append((i, elem))
    for i in lst:
        if x <= i[1]:
            return i[0]
    return len(seq)

Task: Sequential Search


def search(x, seq):
    if len(seq)==0:
        return 0
    for i in range(0,len(seq)):
        if 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):
    counter=0
    while counter<len(seq):
        if seq[counter]>=x:
            return counter
        counter+=1
    return len(seq)

Task: Sequential Search


def search(x, seq):
    if len(seq)==0:
        return 0
    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):
    seq_len = len(seq)
    for i in range(seq_len):
        if x <= seq[i]: return i
    return seq_len

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    if seq==[]or 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):
    for i in range(len(seq)):
        if x<=seq[i]:
            return i
    return len(seq) #if x is larger then all element in 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):
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
    return len(seq)

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

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):
    result = 0
    counter = 0
    while counter < len(seq):
        temp = seq[counter]
        if x <= temp:
            return counter
        counter = counter + 1
    if counter == 0 and len(seq)!= 0:
        return len(seq)
    return counter

Task: Sequential Search


def search(x, seq):
    y = 0
    for z in seq:
        if x > z:
            y += 1
    return y

Task: Sequential Search


def search(x, seq):
    enumerated_list =()
    res= 0
    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):
    if len(seq)==0:
        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):
    pos = 0
    for i in range(len(seq)):
        if x <= seq[i]:
            pos = i
            return pos
    return len(seq)

Task: Sequential Search


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

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):
    for i in range(len(seq)-1):
        if seq[i] < x <= seq[i+1]:
            return i+1
        elif x <= seq[0]:
            return 0
    return len(seq)

Task: Sequential Search


def search(x, seq):
    length = len(seq)
    if length == 0: return 0
    elif length == 1: return 0 if x < seq[0] else 1
    else:
        for i in range(length):
            if x <= seq[i]: return i
        return length # x is larger than everything in seq, so x goes to the end

Task: Sequential Search


Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    for k in range(len(seq)):
        if x <= seq[k]:
            return k
        elif x > seq[k]:
            continue
    return len(seq)  # if bigger than the last element

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):
	position = tuple(enumerate(seq))
	if len(seq) == 0:
		return 0
	else:
		for i in position :
			if x <= i[1]:
				return i[0]
		return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq==[]or 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 seq == []:
        return 0
    for i in range (0, len(seq)):
        if x <= seq[i]:
           pos = i
           return pos
        if x > seq[len(seq)-1]:
           return len(seq)

Task: Sequential Search


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

    return counter

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

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):
    counter = 0
    for i in seq:
        if x>i:
            counter +=1 #all the element that is the smaller than x
    return counter

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 type(seq) == tuple:
        lst = list(seq)
    else:
        lst = seq

    counter = 0
    for i in lst:
        if x <= i:
            continue
        else:
            counter += 1
    return counter

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


Task: Sequential Search


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

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:
                continue
            else:
                return seq.index(i)

Task: Sequential Search


def search(x, seq):
    if not 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):
    i=0
    while i<len(seq):
        if x<=seq[i]:
            return i
        else:
            i+=1
    return len(seq)

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    position=enumerate(seq)
    if len(seq)==0:
        return 0
    elif 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):
    if seq==() or 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 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):
    for i in range(len(seq)):
        if seq[i] >= x:
            return i
    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 seq == () or 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(0,len(seq)):
        if seq[i] >= x:
            return max(i, 0)
    return len(seq)

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

    return position

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, elem in enumerate(seq):
            if x <= elem:
                return i
        return None

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    else:
        for i, elem in enumerate(seq):
            if x <= elem:
                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):
    a = 0
    for i,j in enumerate(seq):
        if x > j and i < len(seq)-1:
            continue
        elif x <= j:
            a = i
            break
        else:
            a = len(seq)
    return a

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    if seq == () or 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):
    position = 0
    for i in range(len(seq)):
        if x <= seq[i]:
            position = i
            break
        else:
            position = len(seq)
    return position

Task: Sequential Search


def search(x, seq):
    lst = list(seq)
    lst.append(x)
    sort = []
    while lst:
        smallest = lst[0]
        for ele in lst:
            if ele < smallest:
                smallest = ele
        lst.remove(smallest)
        sort.append(smallest)
    for i in range(len(sort)):
        if sort[i] ==x:
            return i

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):
    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


def search(x, seq):
    for i, elem in enumerate(seq):
        if elem >= x:
            return i #return the position of elem
    return len(seq) #if x > the largest value of seq, return the last position (len(seq))

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:
        if i< x:
            counter += 1
        elif i == x or i>x:
            break
    return counter

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    a = list(enumerate(seq))
    if seq == () or seq == []:
        return 0
    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):
    value = 0
    for i in range(0, len(seq)):
        if (x > seq[i]):
            value += 1
        elif (x <= seq[i]):
            break
    return value

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    else:
        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):
    if not seq:
        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):
    position = 0

    for i,e in enumerate(seq):
        if x > e:
            position = i+1

    return position

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:    #if there is nothing in the sequence, put it as the first part of the column
        return 0
    else:
        for i in range(len(seq)):
            if x > seq[-1]:  #if the digit x is greater than the greatest number in the sequence, return the number of elements in the sequence
                return len(seq)
            elif x <= seq[i]: #to return the number when x is smaller of equals to the i in the loop
                return i
            else:
                continue #goes into a loop until it finds the number that matches the previous answer.

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    counter = 0
    result = 0
    while counter < len(seq):
        if x < min(seq):
            result = 0
            break
        elif x > max(seq):
            result = len(seq)
            break
        elif x <= seq[counter]:
            result = counter
            break
        counter += 1
    return result

Task: Sequential Search


Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    total = seq
    counter = 0
    while counter != len(seq):
        if x <= total[counter]:
            break
        else:
            counter += 1
    return counter

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
   brokeloop=False
   if len(seq)==0:
       return 0
   for i, elem in enumerate(seq):
       if elem>=x:
           brokeloop=True
           break
   if brokeloop==True:
       return i
   else:
        return i+1

Task: Sequential Search


def search(x, seq):
    for index in range(len(seq)):
        if x<= seq[index]:
            return index
    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)
    for i in range(len(seq)):
        if x == seq[i]:
            return i
        elif x > seq[i-1] and x < seq[i]:
            return i

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return 0
    elif seq == []:
        return 0
    else:
        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 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 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 len(seq) == 0:
        return 0
    else:
        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):
    counter = 0
    for a in seq:
        if x > a:
            counter = counter + 1
    return counter

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 in range (len(seq)):
        if x <= seq[i]:
            return i
    return len(seq)

Task: Sequential Search


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

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    output = 0
    for j in seq:
        if x>j:
            output +=1
    return output

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

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):
    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 a, i in enumerate(seq):
        if x <= i:
            return a
    return len(seq)

Task: Sequential Search


def search(x, seq):
    counter=0
    while counter<len(seq):
        if seq[counter]>=x:
            return counter
        counter+=1
    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):
    for i, element in enumerate(seq):
        if x <= element:
            return i
        else:
            continue
    return len(seq)

Task: Sequential Search


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

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
    return 0

Task: Sequential Search


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

Task: Sequential Search


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

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):
    r=0
    for i in seq:
        if x>i:
            r+=1
    return r

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    count = 0
    if seq == () or seq == []:
        return 0
    else:
        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):
##    n = 0
    for num in seq:
        if x>num:
            n +=1
        else:
            return n
    return n

Task: Sequential Search


def search(x, seq):
    if len(seq)==0:
        return 0
    for i, elem in enumerate(seq):
        if x<=elem:
            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==() or 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):
    n = len(seq)
    if n == 0:
        return 0
    else:
        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):
    if len(seq) == 0:
        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 len(seq)==0:
        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 i, elem in enumerate(seq):
        if elem>=x:
            return i
        else:
            continue
    return len(seq)

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return 0
    elif seq == []:
        return 0
    else:
        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):
    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)))+1

Task: Sequential Search


def search(x, seq):
    count=0
    while count<len(seq):
        if x>seq[count]:
            count+=1
            continue
        else:
            return count
    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):
    for i, elem in enumerate(seq):
        if elem == x:
            return i
        elif x > elem:
            continue
        elif x < elem:
            return i
    return len(seq)

Task: Sequential Search


Task: Sequential Search


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

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
    elif x < seq[0]:
        return 0
    elif x > seq[-1]:
        return len(seq)
    for i in range(len(seq)):
        if x == seq[i]:
            return i
        elif x > seq[i-1] and x < seq[i]:
            return i

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    if type(seq) == tuple:
        lst = list(seq)
    else:
        lst = seq

    counter = 0
    for i in lst:
        if x <= i:
            continue
        else:
            counter += 1
    return counter

Task: Sequential Search


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

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):
    value = 0
    for i in range(0, len(seq)):
        if (x > seq[i]):
            value += 1
        elif (x <= seq[i]):
            break
    return value

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):
    for i, elem in enumerate(seq):
        if elem >= x:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return 0
    elif seq == []:
        return 0
    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):
    for i in range(len(seq)):
        if x<=seq[i]:
            return i
    return len(seq)

Task: Sequential Search


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

Task: Sequential Search


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

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):
    for i, j in enumerate(seq):
        if x <= j:
            return i
    return len(seq)

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)
    return helper(index)

Task: Sequential Search


def search(x, seq):
    if len(seq) ==0 :
        return 0
    else:
        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):
    count = 0
    for i in seq:
        if x > i:
            count += 1
    return count

Task: Sequential Search


def search(x, seq):
    if seq == [] or 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


Task: Sequential Search


def search(x, seq):
    n = 0
    a = 0
    while n < len(seq):
        if seq[n] < x:
            n = n + 1
            a = n
        else:
            break
    return a

Task: Sequential Search


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

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 seq == () or seq == []:
        return 0
    else:
        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):
    if len(seq) == 0:
        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 type(seq) == list:
        seq.append(x)
        seq.sort()
        for i, elem in enumerate(seq):
            if elem == x:
                return i
    else:
        seq+=(x,)
        for i, elem in enumerate(sorted(seq)):
            if elem == x:
                return i

Task: Sequential Search


def search(x, seq):
    result = 0
    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):
    counter = 0
    for i in seq:
        if x < i:
            return counter
        elif x == i:
            return counter
        else:
            counter += 1
    return counter

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):
    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):
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
    else:
        return len(seq)

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:
                continue
            else:
                return seq.index(i)

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 len(seq) == 0:
        return 0
    elif 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):
    for i, elem in enumerate(seq):
        if x <= elem:
            return i
    return len(seq)

Task: Sequential Search


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

Task: Sequential Search


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 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):
    for i in enumerate(seq):
        if x <= i[1]:
            if i[0] == 0:
                return 0
            else:
                return i[0]
    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 == 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 in range(len(seq)):
        if x <= seq[i]:
            return i
    else:
        return len(seq)

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    if seq == [] or seq == ():
        return  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):
    for k in range(len(seq)):
        if x <= seq[k]:
            return k
        elif x > seq[k]:
            continue
    return len(seq)  # if bigger than the last element

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):
    for i in range(len(seq)):
        if seq[i] >= x:
            return i
    return len(seq)

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):
    for i in range(len(seq)):
        if x<=seq[i]:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    a = list(enumerate(seq))
    if seq == () or seq == []:
        return 0
    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):
    lenth=len(seq)
    for i in range(0,lenth):
        if x>seq[i]:
            continue
        else:
            return i
    return lenth

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

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

Task: Sequential Search


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

Task: Sequential Search


Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    for i, elem in enumerate(seq):
        if elem >= x:
            return i #return the position of elem
    return len(seq) #if x > the largest value of seq, return the last position (len(seq))

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:
            continue
        else:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    position=enumerate(seq)
    if len(seq)==0:
        return 0
    elif 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):
    count = 0
    for i in seq:
        if x > i:
            count = count + 1
    return count

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, elem in enumerate(seq):
            if x <= elem:
                return i

Task: Sequential Search


def search(x, seq):
    enumerated_list =()
    res= 0
    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):
    position = 0
    for ele in seq:
        if x > ele:
            position = position + 1
    return position

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 in range(len(seq)):
        if seq[i] >= x:
            return i
    return len(seq)

Task: Sequential Search


def search(x, seq):
    counter = 0
    new_seq = list(seq)
    if new_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):
    for i, val in enumerate(seq):
        if x <= val:
            return i
    return len(seq)

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 len(seq) == 0:
        return 0
    else:
        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 len(seq) == 0:
        return 0
    else:
        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):
    position = 0
    for i in seq:
        if x <= i:
            break
        position = position + 1
    return position

Task: Sequential Search


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

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
    if seq[0] >= x:
        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


Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    position = 0
    while position < len(seq):
        if seq[position] == x:
             break
        elif seq[position] > x:
            break
        position = position + 1
    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 seq==[]:
        return 0
    for i,element in enumerate(seq):
        if x<=element:
            return i
    return len(seq)

Task: Sequential Search


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

Task: Sequential Search


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

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):
    for i in range(len(seq)):
        if x<= seq[i]:
            return i
    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):
    for i in range(len(seq)):
        if seq[0]>0 and x<0:
            return 0
        elif x==seq[i] or x<seq[i]:
            return i
    else:
        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 x <= elem:
                return i
            else:
                continue

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(0, len(seq) + 1):
        if len(seq) == 0:
            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):
    position = 0
    found = False

    while position < len(seq) and not found:
        if x <= seq[position]:
            found = True
        else:
            position += 1

    return position

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    if len(seq) == 0:
        return 0
    else:
        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):
    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)):
            if x>seq[i] and x<seq[i+1]:
                return i+1
            elif x==seq[i]:
                return i

Task: Sequential Search


Task: Sequential Search


def search(x,seq):
    if len(seq) == 0:
        return 0
    else:
        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):
    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_list = list(seq)
        temp_list.append(x,)
        temp_list.sort()
        for i, elem in enumerate(temp_list):
            if elem == x:
                return i

Task: Sequential Search


def search(x, seq):
    if 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
    if x < seq[0]:
        return 0
    elif x > seq[len(seq)-1]:
        return len(seq)

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):
    for i,elem in enumerate(seq):
        if x<=elem:
            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==[]:
        return 0
    elif seq==():
        return 0
    else:
        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)
    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 0

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    index_for_x = 0
    for index, element in enumerate(seq) :
        if element < x:
            index_for_x+=1
        else:
            break
    return index_for_x

Task: Sequential Search


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

Task: Sequential Search


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

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):
    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
    else:
        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, ele in enumerate(seq, 0):
        if x > ele:
            i += 1
        else:
            break
    return i

Task: Sequential Search


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

    return index

Task: Sequential Search


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

Task: Sequential Search


Task: Sequential Search


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

Task: Sequential Search


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

    return len(seq)

Task: Sequential Search


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

Task: Sequential Search


def search(key, seq):
    lst = list(seq)
    n = len(lst)
    for i in range(n+1): #0,1,2,3
        if i <= n-1 and key <= lst[i]:
            return i
    return n

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):
    n = len(seq)
    for i in range(n):
        next_element = seq[i]
        if x <= next_element:
            return i
    return n

Task: Sequential Search


def search(x, seq):
    if seq == ():
        return 0
    elif seq == []:
        return 0
    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):
    index = 0
    while index < len(seq):
        if x <= seq[index]:
            break
        else:
            index += 1
    return index

Task: Sequential Search


def search(x, seq):
    if len(seq)==0:
        return 0
    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


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):
    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)

def search(x, seq):
    if len(seq) == 0:
            return 0
    else:
        for i, elem in enumerate(seq):
            if 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):
    if len(seq) == 0:
            return 0
    else:
        for i, elem in enumerate(seq):
            if 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):
    if seq==() or seq==[]:
            return 0
    else:
        largest=seq[0]
        for i in range(len(seq)):
            if x<=seq[i]:
                return i
            elif x>seq[len(seq)-1]:
                return len(seq)

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    counter = 0
    result = 0
    while counter < len(seq):
        if x < min(seq):
            result = 0
            break
        elif x > max(seq):
            result = len(seq)
            break
        elif x <= seq[counter]:
            result = counter
            break
        counter += 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):
    if seq == () or seq == []:
        return 0
    for i in range(len(seq)):
        if x > seq[-1]:
            return len(seq)
        elif x <= seq[i]:
            return i

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    #Takes in a value x and a sorted sequence seq, and returns the
    #position that x should go to such that the sequence remains sorted

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

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    #Takes in a value x and a sorted sequence seq, and returns the
    #position that x should go to such that the sequence remains sorted
    i =0
    for p in seq:
        if x <= p:
            return i
        i += 1
    return len(seq)

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    position = 0
    found = False

    while position < len(seq) and not found:
        if x <= seq[position]:
            found = True
        else:
            position += 1

    return position

Task: Sequential Search


def search(x, seq):
    if len(seq)==0 or 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):
    for i in range(len(seq)-1):
        if x < seq[0]:
            return 0
        elif seq[i] <= x <= seq[i+1]:
            return i+1
    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):
    count = 0
    for i in seq:
        if x > i:
            count = count + 1
    return count

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):
    counter = 0
    for a in seq:
        if x > a:
            counter = counter + 1
    return counter

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):
    index = 0
    for i in seq:
        if x>i:
            index+=1
        else:
            return index

    return index

Task: Sequential Search


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

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

    for i in enumerate(seq):
        if x == i[1]:
            return 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):

    count = 0

    for i in seq:
        if x > i:
            count += 1
    return count

    return

Task: Sequential Search


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

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

Task: Sequential Search


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

Task: Sequential Search


Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    counter = 0
    result = 0
    while counter < len(seq):
        if x < min(seq):
            result = 0
            break
        elif x > max(seq):
            result = len(seq)
            break
        elif x <= seq[counter]:
            result = counter
            break
        counter += 1
    return result

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    def find_index(tup,elem):
        for i, j in enumerate(tup):
            if j==elem:
                return i
    if seq==[] or seq==():
        return 0
    elif x<=seq[len(seq)-1]:
        for i in seq:
            if x<=i:
                return find_index(seq,i)
    elif x>seq[len(seq)-1]:
        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):
    for i, elem in enumerate(seq):
        if x<=elem:
            return i
    return len(seq)

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    position = 0
    if seq == ():
    #Terminates if there is no list of tuple at all
        return position
    else:
        for i in range(len(seq)):
            if x <= seq[i]:
            #Termniates once the sorted position is found
                position = i
                break
            elif i == len(seq)-1:
            #Teminates when it finished sorting through and all are smaller
                position = len(seq)
        return position

Task: Sequential Search


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

Task: Sequential Search


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

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:
        for i in range(len(seq)):
            if x <= seq[i]:
                return i

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    for position, elem in enumerate(seq):
        if x <= elem:
            return position #position to insert x
    return len(seq)

Task: Sequential Search


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

Task: Sequential Search


Task: Sequential Search


def search(x, seq):
    position = 0
    for num in enumerate(seq):
        if x <= num[1]:
            position = position
        elif x > num[1]:
            position += 1

    return position

Task: Sequential Search


def search(x, seq):
    counter = 0
    for i in seq:
        if x>i:
            counter +=1 #all the element that is the smaller than x
    return counter

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 len(seq)< 1:
        return 0
    else:
        for i in range(len(seq)):
            if x <= seq[i]:
                return i
            else:
                if x > 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
    else:
        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 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):
    counter = 0
    for i in range(len(seq)):
        if x > seq[i]:
            counter += 1
        else:
            break
    return counter

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

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

    for i in enumerate(seq):
        if x == i[1]:
            return 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):
    if len(seq) == 0:
        return 0
    elif x > 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):
    a = 0
    for i in seq:
        if i<x:
            a += 1
        else:
            break
    return a

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):
    counter = 0
    for i in seq:
        if i < x:
            counter = counter + 1
    return counter

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):
    if len(seq)==0:
        return 0
    for i in range(len(seq)):
        if x<=seq[i]:
            return i
    return i+1

Task: Sequential Search


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

Task: Sequential Search


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

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):
    y = len(seq)
    if y == 0:
        return 0
    if x < seq[0]:
        return 0
    else:
        for i in range(y-1):
            if x > seq[i] and x <= seq[i+1]:
                return i + 1
        return y

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

    return len(seq)

Task: Sequential Search


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

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):
    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
    else:
        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