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

Task: Sequential Search


Task: Sequential Search


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

    for i, x in seq:
        if x < seq[i]:
            return i
    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

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

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


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

    return position

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 += position

    return position

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 type(seq) == tuple:
        new_seq = list(seq)
        sort = []
        for i in range(len(new_seq)):
            if new_seq[i]<=x:
                sort.append(new_seq[i])
            else:
                sort.append(x)
                sort.extend(new_seq[i:])
                break
        return sort
    else:
        sort = []
        for i in range(len(seq)):
            if seq[i]<=x:
                sort.append(seq[i])
            else:
                sort.append(x)
                sort.extend(seq[i:])
                break
        return sort

Task: Sequential Search


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

Task: Sequential Search


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


Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

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

Task: Sequential Search


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


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

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

    for i in seq:

        if seq == () or seq == []:

            return 0

        elif x <= i:

            return seq.index(i)

        elif x > seq[-1]:

            return (seq.index(seq[-1])) + 1

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


def search(x,seq):
    tup = ()
    if type(seq) == tuple:
        for i in seq:
            if i < x:
                tup = tup + (i,)
            else:
                tup = tup + (x,)
                break
        return len(tup) - 1

Task: Sequential Search


def search(x,seq):
    if type(seq) == tuple:
        tup = ()
        for i in seq:
            if i < x:
                tup = tup + (i,)
            else:
                tup = tup + (x,)
                break
        return len(tup) - 1

    elif type(seq) == list:
        lst = []
        for i in seq:
            if i < x:
                lst.append(i)
            else:
                lst.append(x)
                break
        return len(lst) - 1

Task: Sequential Search


def search(x,seq):
    if type(seq) == tuple:
        tup = ()
        for i in seq:
            if i < x:
                tup = tup + (i,)
            else:
                tup = tup + (x,)
                break
        return len(tup) - 1

    elif type(seq) == list:
        lst = []
        for i in seq:
            if i < x:
                lst.append(i)
            else:
                lst.append(x)
                continue
        return len(lst) - 1

Task: Sequential Search


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

Task: Sequential Search


def search(x,seq):
    if type(seq) == tuple:
        tup = ()
        for i in seq:
            if i < x:
                tup = tup + (i,)
            else:
                tup = tup + (x,)
                break
        return len(tup) - 1

    elif type(seq) == list:
        counter = 0
        for i in seq:
            if i < x:
                counter = counter + 1
        return counter

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    while (x<seq[i] and i < len(seq)):
        i += 1
    if i==len(seq):
        seq.append(x)
    else:
        seq.insert(i, x)
    return seq

Task: Sequential Search


def search(x, seq):
    i = 0
    while (x<seq[i] and i < len(seq)):
        i += 1
    if i==len(seq):
        seq.append(x)
    else:
        seq.insert(i, x)
    return seq

Task: Sequential Search


def search(x, seq):
    i = 0
    while (i<len(seq) and x<seq[i]):
        i += 1
    if i==len(seq):
        seq += (x,)
    else:
        seq.insert(i, x)
    return seq

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    i = 0
    while (i<len(seq) and x<seq[i]):
        i += 1
    i -= 1
    return i

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    if type(seq) == tuple:
        new_seq = list(seq)
        sort = []
        for i in range(len(new_seq)):
            if max(new_seq) < x:
                sort.extend(new_seq)
                sort.append(x)
            elif new_seq[i] >=x:
                sort.append(x)
                sort.extend(new_seq[i:])
                break
            elif new_seq[i]<x:
                sort.append(new_seq[i])

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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

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

    return counter

Task: Sequential Search


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

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

    return counter

Task: Sequential Search


def search(x,seq):

    if max(seq) < x:

        return len(seq)

    if x <= min(seq):

        return 0

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


def search(x,seq):
    if max(seq) < x:
        return len(seq)
    if x <= min(seq):
        return 0

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


def search(x, seq):
    if type(seq) == tuple:
        new_seq = list(seq)
        sort = []
        for i in range(len(new_seq)):
            if max(new_seq) < x:
                sort.extend(new_seq)
                sort.append(x)
            elif new_seq[i] >=x:
                sort.append(x)
                sort.extend(new_seq[i:])
                break
            elif new_seq[i]<x:
                sort.append(new_seq[i])

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

Task: Sequential Search


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

Task: Sequential Search


Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


def search(x,seq):

    if max(seq) < x:

        return len(seq)

    if x <= min(seq):

        return 0

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


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

Task: Sequential Search


def unique_day(day, possible_birthdays):
    count = 0
    for birthday in possible_birthdays:
        if birthday[1] == day:
            count += 1
    return count == 1

def unique_month(month, possible_birthdays):
    count = 0
    for birthday in possible_birthdays:
        if birthday[0] == month:
            count += 1
    return count == 1

def contains_unique_day(month, possible_birthdays):
    for birthday in possible_birthdays:
        if birthday[0] == month and unique_day(birthday[1], possible_birthdays):
            return True
    return False

tuple_of_possible_birthdays = (('May', '15'),
                              ('May', '16'),
                              ('May', '19'),
                              ('June', '17'),
                              ('June', '18'),
                              ('July', '14'),
                              ('July', '16'),
                              ('August', '14'),
                              ('August', '15'),
                              ('August', '17'))

assert unique_day("1", (("January","1"),("February","1")))==False and unique_month("January", (("January","1"),("January","2")))==False and unique_month("January", (("January","1"),("February","1")))==True and contains_unique_day("January", (("January","1"),("January","2")))==True and contains_unique_day("January", (("January","1"),("February","1")))==False and contains_unique_day("February", (("January","10"),("February","1"),("February","10")))==True and unique_day("3", (("January","1"),("January","2")))==False and unique_month("March", (("January","1"),("February","1")))==False and unique_day("1", (("January","1"),("January","2")))==True and unique_day("16", tuple_of_possible_birthdays)==False and unique_day("17", tuple_of_possible_birthdays)==False and unique_day("18", tuple_of_possible_birthdays)==True and unique_day("19", tuple_of_possible_birthdays)==True and unique_month("May", tuple_of_possible_birthdays)==False and unique_month("June", tuple_of_possible_birthdays)==False and contains_unique_day("June", tuple_of_possible_birthdays)==True and contains_unique_day("July", tuple_of_possible_birthdays)==False

Task: Unique dates and months

Implement unique_day, unique_month and contains_unique_day.


def unique_day(day, possible_birthdays):
    all_days = ()
    for i in possible_birthdays:
        all_days += (i[1],)
    return all_days.count(day) == 1

def unique_month(month, possible_birthdays):
    all_months = ()
    for i in possible_birthdays:
        all_months += (i[0],)
    return all_months.count(month) == 1

def contains_unique_day(month, possible_birthdays):
    all_day_in_given_month = ()
    for i in possible_birthdays:
        if i[0] == month:
            all_day_in_given_month += (i[1],)
    for i in all_day_in_given_month:
        if unique_day(i, possible_birthdays):
            return True
    return False


def unique_day(day, possible_birthdays):
    count = 0
    for birthday in possible_birthdays:
        if birthday[1] == day:
            count += 1
    return count == 1

def unique_month(month, possible_birthdays):
    count = 0
    for birthday in possible_birthdays:
        if birthday[0] == month:
            count += 1
    return count == 1

def contains_unique_day(month, possible_birthdays):
    for birthday in possible_birthdays:
        if birthday[0] == month:
            if unique_day(birthday[1], possible_birthdays):
                return True
    return False


def unique_day(day, possible_birthdays):
    def dayfilter(birthday):
        if birthday[1] == day:
            return True
        else:
            return False
    possible = tuple(filter(dayfilter,possible_birthdays))
    if len(possible) == 1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):
    def monthfilter(birthday):
        if birthday[0] == month:
            return True
        else:
            return False
    possible = tuple(filter(monthfilter,possible_birthdays))
    if len(possible) == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    def monthfilter(birthday):
        if birthday[0]==month:
            return True
        else:
            return False
    possible = tuple(filter(monthfilter,possible_birthdays))
    def daymap(birthday):
        return birthday[1]
    possibledays = tuple(map(daymap,possible))
    result = False
    for n in range(0,len(possibledays)):
        if unique_day(possibledays[n],possible_birthdays):
            result = True
    return result


def unique_day(day, possible_birthdays):
    possible_days = tuple(map(lambda x: x[1], possible_birthdays))
    if possible_days.count(day) == 1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):
    possible_months = tuple(map(lambda x: x[0], possible_birthdays))
    if possible_months.count(month) == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    #Gets the unique days in the form (month, days)
    unique_days = tuple(filter(lambda x: unique_day(x[1], possible_birthdays), possible_birthdays))
    for birthday in unique_days:
        if birthday[0] == month:
            return True
    return False


def unique_day(date, possible_birthdays):
    count = 0
    for birthday in possible_birthdays:
        if birthday[1] == date:
            count += 1
    return count == 1

def unique_month(month, possible_birthdays):
    count = 0
    for birthday in possible_birthdays:
        if birthday[0] == month:
            count += 1
    return count == 1

def contains_unique_day(month, possible_birthdays):
    for birthday in possible_birthdays:
        if birthday[0] == month:
            if unique_day(birthday[1], possible_birthdays):
                return True
    return False


def unique_day(day, possible_birthdays):
    return tuple(map(lambda x: x[1], possible_birthdays)).count(day) == 1

def unique_month(month, possible_birthdays):
    return tuple(map(lambda x: x[0], possible_birthdays)).count(month) == 1

def contains_unique_day(month, possible_birthdays):
    is_unique_day = tuple((i, unique_day(i, possible_birthdays)) for i in tuple(map(lambda y: y[1], possible_birthdays)))
    is_unique_day_true = tuple(map(lambda c: c[0], tuple(filter(lambda b: b[1] == True, is_unique_day))))
    days_in_month = tuple(map(lambda b: b[1], tuple(filter(lambda d: d[0] == month, possible_birthdays))))
    check_month = tuple(x in days_in_month for x in is_unique_day_true)
    return True in check_month


def unique_day(day, possible_birthdays):
    counter = 0
    for i in possible_birthdays:
        if day in i:
            counter += 1
    return counter == 1

def unique_month(month, possible_birthdays):
    counter = 0
    for i in possible_birthdays:
        if month in i:
            counter += 1
    return counter == 1

def contains_unique_day(month, possible_birthdays):
    daysinmonth =()
    for i in possible_birthdays:
        if month in i:
            daysinmonth += (i[1],)
    for j in daysinmonth:
        if unique_day(j, possible_birthdays):
            return True
    return False


def unique_day(day, possible_birthdays):
    count=0
    for i in possible_birthdays:
        if i[1]==day:
            count+=1
    return count==1

def unique_month(month, possible_birthdays):
    count=0
    for i in possible_birthdays:
        if i[0]==month:
            count+=1
    return count==1

def contains_unique_day(month, possible_birthdays):
    for i in possible_birthdays:
        if i[0]==month and unique_day(i[1],possible_birthdays):
            return True
    return False


def unique_day(day, possible_birthdays):

    days = 0

    for i in range(len(possible_birthdays)): #creating the for loop for the range of possible birthdays
        if possible_birthdays[i][1] == day: # looking for the date according to the list
            days = days + 1

    if days == 1:  #return when the day matches
        return True
    else:
        return False

def unique_month(month, possible_birthdays):

    months = 0
    for j in range(len(possible_birthdays)):  #creating the for loop for the range of possible birthday months

        if possible_birthdays[j][0] == month:# looking for the month according to the list
            months = months + 1
    if months == 1: #return when the month matches
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):

    tup = ()

    for k in range(len(possible_birthdays)):
        if possible_birthdays[k][0] == month:
            tup = tup + (possible_birthdays[k],)

    for l in range(len(tup)):
        if unique_day(tup[l][1], possible_birthdays):
            return True
    return False


def unique_day(day, possible_birthdays):
    count = 0
    days = map(lambda x:x[1], possible_birthdays)
    for i in days:
        if i == day:
            count += 1
    if count != 1:
        return False
    return True

def unique_month(month, possible_birthdays):
    count = 0
    months = map(lambda x:x[0], possible_birthdays)
    for i in months:
        if i == month:
            count += 1
    if count != 1:
        return False
    return True

def contains_unique_day(month, possible_birthdays):
    months = map(lambda x:x[0], possible_birthdays)
    for birthday in possible_birthdays:
        if birthday[0] == month:
            if unique_day(birthday[1], possible_birthdays):
                return True
    return False


def unique_day(day, possible_birthdays):
    count = 0
    for i in range(len(possible_birthdays)):
        if day == possible_birthdays[i][1]:
            count += 1
    if count == 1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):
    count = 0
    for i in range(len(possible_birthdays)):
        if month == possible_birthdays[i][0]:
            count += 1
    if count == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    for date in possible_birthdays:
        if unique_day(date[1], possible_birthdays) == True and month == date[0]:
            return True
    return False


def unique_day(day, possible_birthdays):

    days = 0

    for i in range(len(possible_birthdays)):
        if possible_birthdays[i][1] == day:
            days = days + 1

    if days == 1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):

    months = 0
    for j in range(len(possible_birthdays)):

        if possible_birthdays[j][0] == month:
            months = months + 1
    if months == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):

    x = ()

    for k in range(len(possible_birthdays)):

        if possible_birthdays[k][0] == month:

            x = x + (possible_birthdays[k],)

    for l in range(len(x)):
        if unique_day(x[l][1], possible_birthdays):
            return True
        else:
            continue
    return False


def unique_day(day, possible_birthdays):

    days = 0

    for i in range(len(possible_birthdays)): #creating the for loop for the range of possible birthdays
        if possible_birthdays[i][1] == day: # looking for the date according to the list
            days = days + 1

    if days == 1:  #return when the day matches
        return True
    else:
        return False

def unique_month(month, possible_birthdays):

    months = 0
    for j in range(len(possible_birthdays)):  #creating the for loop for the range of possible birthday months

        if possible_birthdays[j][0] == month:# looking for the month according to the list
            months = months + 1
    if months == 1: #return when the month matches
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):

    x = ()

    for k in range(len(possible_birthdays)):

        if possible_birthdays[k][0] == month:

            x = x + (possible_birthdays[k],)

    for l in range(len(x)):
        if unique_day(x[l][1], possible_birthdays):
            return True
    return False


def unique_day(day, possible_birthdays):
    count_day = 0
    for i in possible_birthdays:
        if i[1] == day:
            count_day += 1
    if count_day == 1:
        return True
    return False

def unique_month(month, possible_birthdays):
    count_month = 0
    for i in possible_birthdays:
        if i[0] == month:
            count_month += 1
    if count_month == 1:
        return True
    return False

def contains_unique_day(month, possible_birthdays):
    possible_days = ()
    for i in possible_birthdays:
        if i[0] == month:
            possible_days += (i[1],)
    for i in possible_days:
        if unique_day(i, possible_birthdays) == True:
            return True
    return False


def unique_day(day, possible_birthdays):
    counter = 0
    for bday in possible_birthdays:
        if day == bday[1]:
            counter += 1
    if counter == 1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):
    counter = 0
    for bday in possible_birthdays:
        if month == bday[0]:
            counter += 1
    if counter == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    days_in_month = ()
    for bday in possible_birthdays:
        if month == bday[0]:
            days_in_month += (bday[1],)
    for day in days_in_month:
        if unique_day(day, possible_birthdays) == True:
            return True
    return False


def unique_day(day, possible_birthdays):
    counter = 0
    for birthday in possible_birthdays:
        counter += 1 if day == birthday[1] else 0
    return (counter == 1)

def unique_month(month, possible_birthdays):
    counter = 0
    for birthday in possible_birthdays:
        counter += 1 if month == birthday[0] else 0
    return (counter == 1)

def contains_unique_day(month, possible_birthdays):
    birthdays_in_month = ()
    for birthday in possible_birthdays:
        if birthday[0] == month: birthdays_in_month += (birthday,)

    for birthday in birthdays_in_month:
        if unique_day(birthday[1], possible_birthdays):
            return True
    return False


def unique_day(day, possible_birthdays):
    counter = 0
    for dates in possible_birthdays:
        if day in dates:
            counter += 1
    if counter == 1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):
    counter = 0
    for dates in possible_birthdays:
        if month in dates:
            counter += 1
    if counter == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    counter = 0
    filtered_dates = ()
    for dates in possible_birthdays:
        if month in dates:
            filtered_dates += (dates,)
    for date in filtered_dates:
        if unique_day(date[1], possible_birthdays):
            return True
    return False


def unique_day(day, possible_birthdays):
    tup = ()
    for i in possible_birthdays:
        if i[1] == day:
            tup += (i[1],)
    if len(tup) == 1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):
    tup = ()
    for i in possible_birthdays:
        if i[0] == month:
            tup += (i[0],)
    if len(tup) == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    tup = ()
    for date in possible_birthdays:
        if date[0] == month:
            tup += (date,)
    for bday in tup:
        if unique_day(bday[1], possible_birthdays):
            return True
    return False


def unique_day(date, possible_birthdays):
    count = 0
    for tup in possible_birthdays:
        if tup[1] == date:
            count+=1
    return count == 1

def unique_month(month, possible_birthdays):
    count = 0
    for tup in possible_birthdays:
        if tup[0] == month:
            count+=1
    return count == 1

def contains_unique_day(month, possible_birthdays):
    month_tup = ()
    for tup in possible_birthdays:
        if month in tup:
            month_tup += (tup,)
    for tup in month_tup:
        if unique_day(tup[1],possible_birthdays):
            return True
    return False


def unique_day(day, possible_birthdays):
    count = 0
    for possible_birthday in possible_birthdays:
        if possible_birthday[1] == day:
            count += 1
        continue
    if count == 1:
        return True
    return False

def unique_month(month, possible_birthdays):
    count = 0
    for possible_birthday in possible_birthdays:
        if possible_birthday[0] == month:
            count += 1
        continue
    if count == 1:
        return True
    return False

def contains_unique_day(month, possible_birthdays):
    days_in_month = ()
    for possible_birthday in possible_birthdays:
        if possible_birthday[0] == month:
            days_in_month += (possible_birthday[1],)
        continue
    for day in days_in_month:
        if unique_day(day, possible_birthdays) == True:
            return True
        continue
    return False


def unique_day(date, possible_birthdays):
    flag = 0
    for i in possible_birthdays:
        if i[1] == date:
            flag += 1

    return True if flag == 1 else False

def unique_month(month, possible_birthdays):
    flag = 0
    for i in possible_birthdays:
        if i[0] == month:
            flag += 1

    return True if flag == 1 else False

def contains_unique_day(month, possible_birthdays):
    flag = 0
    unique_days = []

    for i in possible_birthdays:
        if i[1] not in unique_days:
            unique_days.append(i[1])
        else:
            unique_days.remove(i[1])

    for i in possible_birthdays:
        if i[0] == month and i[1] in unique_days:
            return True

    return False


def unique_day(day, possible_birthdays):
    result = 0
    for bday in possible_birthdays:
        if bday[1] == day:
            result += 1
    return result == 1
def unique_month(month, possible_birthdays):
    result = 0
    for bday in possible_birthdays:
        if bday[0] == month:
            result += 1
    return result == 1
def contains_unique_day(month, possible_birthdays):
    filter_month = tuple(filter(lambda x: x[0] == month, possible_birthdays))
    for day in filter_month:
        if unique_day(day[1], possible_birthdays):
            return True
    return False


def unique_day(day, possible_birthdays):
    counter = 0
    for birthday in possible_birthdays:
        if day == birthday[1]:
            counter += 1
    return counter == 1

def unique_month(month, possible_birthdays):
    counter = 0
    for birthday in possible_birthdays:
        if month == birthday[0]:
            counter += 1
    return counter == 1

def contains_unique_day(month, possible_birthdays):
    for birthday in possible_birthdays:
        if birthday[0] == month and unique_day(birthday[1], possible_birthdays) == True:
            return True
    return False


def unique_day(day, possible_birthdays):
    day_count = 0
    for birthday in possible_birthdays:
        if birthday[1] == day:
            day_count = day_count + 1
        if day_count > 1:
            break
    if day_count == 1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):
    month_count = 0
    for birthday in possible_birthdays:
        if birthday[0] == month:
            month_count = month_count + 1
        if month_count > 1:
            break
    if month_count == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    has_unique_day = 0
    for birthday in possible_birthdays:
        if birthday[0] == month:
            if unique_day(birthday[1], possible_birthdays):
                has_unique_day = 1
                break
    if has_unique_day:
        return True
    else:
        return False


def unique_day(day, possible_birthdays):
    day_count = 0
    for i in possible_birthdays:
        if day in i:
            day_count += 1
        if day_count > 1:
            return False
    if day_count == 0:
        return False
    return True

def unique_month(month, possible_birthdays):
    month_count = 0
    for i in possible_birthdays:
        if month in i:
            month_count += 1
        if month_count > 1:
            return False
    if month_count == 0:
        return False
    return True

def contains_unique_day(month, possible_birthdays):
    days_in_month = ()
    for i in possible_birthdays:
        if month in i:
            days_in_month += (i[1],)
    for i in days_in_month:
        if unique_day(i, possible_birthdays):
            return True
    return False


def unique_day(date, possible_birthdays):
    num = 0
    for birthday in possible_birthdays:
        if date == birthday[1]:
            num += 1
    return num == 1

def unique_month(month, possible_birthdays):
    num = 0
    for birthday in possible_birthdays:
        if month == birthday[0]:
            num += 1
    return num == 1

def contains_unique_day(month, possible_birthdays):
    for birthday in possible_birthdays:
        if month == birthday[0]:
            if unique_day(birthday[1], possible_birthdays):
                return True
    return False


def unique_day(day, possible_birthdays):
    counter = 0
    for date in possible_birthdays:
        if day in date:
            counter += 1
    if counter != 1:
        return False
    return True

def unique_month(month, possible_birthdays):
    counter = 0
    for date in possible_birthdays:
        if month in date:
            counter += 1
    return True if counter ==1 else False

def contains_unique_day(month, possible_birthdays):
    contains = ()
    for date in possible_birthdays:
        if month in date and unique_day(date[1],possible_birthdays):
            return True
    return False


def unique_day(day, possible_birthdays):
    days = ()
    for birthdays in possible_birthdays:
        days += (birthdays[1],)
    a = 0
    for dates in days:
        if day == dates:
            a +=1
    if a !=1:
        return False
    return True

def unique_month(month, possible_birthdays):
    months = ()
    for birthdays in possible_birthdays:
        months += (birthdays[0],)
    a = 0
    for dates in months:
        if month == dates:
            a +=1
    if a !=1:
        return False
    return True

def contains_unique_day(month, possible_birthdays):
    dates =()
    for birthdays in possible_birthdays:
        if unique_day(birthdays[1], possible_birthdays):
            dates += (birthdays[0],)
    for days in dates:
        if month in dates:
            return True
        break
    return False


def unique_day(day, possible_birthdays):
    freq=0
    for birthday in possible_birthdays:
        if birthday[1]==day:
            freq=freq+1
        else:
            continue
    if freq==1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):
    freq=0
    for birthday in possible_birthdays:
        if birthday[0]==month:
            freq=freq+1
        else:
            continue
    if freq==1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    for birthday in possible_birthdays:
        if birthday[0]==month:
            if unique_day(birthday[1], possible_birthdays)==True:
                return True
                break

    return False


def unique_day(day, possible_birthdays):
    count = 0
    for birthday in possible_birthdays:
        if birthday[1] == day:
            count += 1
    if count == 1:
        return True
    return False

def unique_month(month, possible_birthdays):
    count = 0
    for birthday in possible_birthdays:
        if birthday[0] == month:
            count += 1
    if count == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    result = ()
    for birthday in possible_birthdays:
        if birthday[0] == month:
            result += (unique_day(birthday[1], possible_birthdays),)
    if any(result):
        return True
    return False


def filter(pred, seq):
    res = ()
    for ele in seq:
        if pred(ele):
            res = res + (ele, )
    return res

def unique_day(day, possible_birthdays):
    return len(filter(lambda x:x[1]==day, possible_birthdays)) == 1

def unique_month(month, possible_birthdays):
    return len(filter(lambda x:x[0]==month, possible_birthdays)) == 1

def contains_unique_day(month, possible_birthdays):
    bdays_in_mth = filter(lambda x:x[0]==month, possible_birthdays)
    for bday in bdays_in_mth:
        if unique_day(bday[1], possible_birthdays):
            return True
    return False


def map(fn, seq):
    res = ()
    for ele in seq:
        res = res + (fn(ele), )
    return res

def filter(pred, seq):
    res = ()
    for ele in seq:
        if pred(ele):
            res = res + (ele, )
    return res

def unique_day(day, possible_birthdays):
    possible_days=map(lambda x:x[1],possible_birthdays)
    def count(day,possible_days):
        count_day=0
        for i in possible_days:
            if i==day:
                count_day=count_day+1
        return count_day
    return count(day,possible_days)==1

def unique_month(month, possible_birthdays):
    possible_months=map(lambda x:x[0],possible_birthdays)
    def count(month,possible_months):
        count_month=0
        for i in possible_months:
            if i==month:
                count_month=count_month+1
        return count_month
    return count(month,possible_months)==1

def contains_unique_day(month, possible_birthdays):
    tuple_with_unique_day=filter(lambda x:unique_day(x[1],possible_birthdays)==True,possible_birthdays)
    month_with_unique_day=map(lambda x:x[0],tuple_with_unique_day)
    return month in month_with_unique_day


def unique_day(day, possible_birthdays):
    total_day = 0
    for birthday in possible_birthdays:
        if birthday[1] == day:
            total_day += 1
    if total_day == 1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):
    total_month = 0
    for birthday in possible_birthdays:
        if birthday[0] == month:
            total_month += 1
    if total_month == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    for birthday in possible_birthdays:
        if unique_day(birthday[1], possible_birthdays):
            birthday_month = birthday[0]
            if month == birthday_month:
                return True
    return False


def unique_day(day, possible_birthdays):
    count = 0
    for x in possible_birthdays:
      if day == x[1]:
        count += 1
    if count == 1:
      return True
    else:
      return False

def unique_month(month, possible_birthdays):
    count = 0
    for x in possible_birthdays:
      if month == x[0]:
        count += 1
    if count == 1:
      return True
    else:
      return False

def contains_unique_day(month, possible_birthdays):
  possible_days = ()
  for x in possible_birthdays:
    if x[0] == month:
      possible_days += (x,)
  for day in possible_days:
    if unique_day(day[1], possible_birthdays) == True:
      return True
  else:
    return False


def unique_day(day, possible_birthdays):
    unique = ()
    for birthday in possible_birthdays:
        if day == birthday[1]:
            unique = unique + (day,)
    if len(unique) == 1:
        return True
    return False

def unique_month(month, possible_birthdays):
    unique = ()
    for birthday in possible_birthdays:
        if month == birthday[0]:
            unique = unique + (month,)
    if len(unique) == 1:
        return True
    return False

def contains_unique_day(month, possible_birthdays):
    correct_months = ()
    for birthday in possible_birthdays:
        if unique_day(birthday[1], possible_birthdays):
            correct_months = correct_months + (birthday[0],)
    if month in correct_months:
        return True
    return False


def unique_day(date, possible_birthdays):
    count = 0
    for i in range(len(possible_birthdays)):
        if possible_birthdays[i][1] == date:
            count += 1
    if count == 1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):
    count = 0
    for i in range(len(possible_birthdays)):
        if possible_birthdays[i][0] == month:
            count += 1
    if count == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    for i in range(len(possible_birthdays)):
        if possible_birthdays[i][0] == month and unique_day(possible_birthdays[i][1], possible_birthdays) == True:
            return True
    return False


def unique_day(day, possible_birthdays):
    count = 0
    for possible_birthday in possible_birthdays:
        if day == possible_birthday[1]:
            count += 1
    return count == 1

def unique_month(month, possible_birthdays):
    count  = 0
    for possible_birthday in possible_birthdays:
        if month == possible_birthday[0]:
            count += 1
    return count == 1

def contains_unique_day(month, possible_birthdays):
    for possible_birthday in possible_birthdays:
        if month == possible_birthday[0] and unique_day(possible_birthday[1], possible_birthdays):
            return True
    return False


def unique_day(day, possible_birthdays):
    days = tuple(map(lambda x: x[1],possible_birthdays))
    count = 0
    for i in days:
        if i == day:
            count = count+1
    return count == 1

def unique_month(month, possible_birthdays):
    months = tuple(map(lambda x: x[0],possible_birthdays))
    count = 0
    for i in months:
        if i == month:
            count = count +1
    return count ==1

def contains_unique_day(month, possible_birthdays):
    specific_set = tuple(filter(lambda x: x[0] == month, possible_birthdays))
    get_days = tuple(map(lambda x: x[1],specific_set))
    ans = tuple(map(lambda x: unique_day(x,possible_birthdays),get_days))
    if True in ans:
        return True
    else:
        return False


def unique_day(day, possible_birthdays):
    counter = 0
    for dates in possible_birthdays:
        if day == dates[1]:
            possible_birthdays = possible_birthdays[1:]
            counter = counter + 1
    if counter == 1:
        return True
    else:
        return False
    return

def unique_month(month, possible_birthdays):
    counter = 0
    for dates in possible_birthdays:
        if month == dates[0]:
            possible_birthdays = possible_birthdays[1:]
            counter = counter + 1
    if counter == 1:
        return True
    else:
        return False

def keep_month(month,possible_birthdays):
    new_list = ()
    for date in possible_birthdays:
        if month == date[0]:
            new_list = new_list + (date,)
    return new_list

def contains_unique_day(month, possible_birthdays):
    counter = 0
    revised_list = keep_month(month,possible_birthdays)
    for i in revised_list:
        if unique_day(i[1], possible_birthdays) == True:
            return True

    return False


def count_dates(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[1] == date:
            count += 1
    return count

def unique_day(date, possible_birthdays):
    if count_dates(date, possible_birthdays) == 1:
        return True
    else:
        return False

def count_months(month, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            count += 1
    return count

def unique_month(month, possible_birthdays):
    if count_months(month, possible_birthdays) == 1:
        return True
    else:
        return False

def days(month, possible_birthdays):
    days_in_month = ()
    for i in range(len(possible_birthdays)):
        if possible_birthdays[i][0] == month:
            days_in_month += (possible_birthdays[i],)
    return days_in_month

def contains_unique_day(month, possible_birthdays):
    for x in range(len(days(month, possible_birthdays))):
        if unique_day(days(month, possible_birthdays)[x][1], possible_birthdays):
            return True
        elif unique_day(days(month, possible_birthdays)[len(days(month, possible_birthdays))-1][1], possible_birthdays) == False:
            return False


def unique_day(day, possible_birthdays):
    counter = 0
    for i in possible_birthdays:
        if day in i:
            counter += 1
    return True if counter == 1 else False

def unique_month(month, possible_birthdays):
    counter = 0
    for i in possible_birthdays:
        if month in i:
            counter += 1
    return True if counter == 1 else False

def contains_unique_day(month, possible_birthdays):
    counter = 0
    result = False
    for i in possible_birthdays:
        if month == i[0]:
            result = result or unique_day(i[1], possible_birthdays)
    return result


def unique_day(date, possible_birthdays):
    tester = 0
    for i in possible_birthdays:
        if date == i[1]:
            if tester:
                return False
            else:
                tester = 1
    return tester

def unique_month(month, possible_birthdays):
    tester = 0
    for i in possible_birthdays:
        if month == i[0]:
            if tester:
                return False
            else:
                tester = 1
    return tester

def contains_unique_day(month, possible_birthdays):
    for i in possible_birthdays:
        if month == i[0]:
            if unique_day(i[1], possible_birthdays):
                return True
    return False


def unique_day(day, possible_birthdays):
    unique_day_counter = 0
    for i in possible_birthdays:
        if day == i[1]:
            unique_day_counter += 1
    if unique_day_counter != 1:
        return False
    return True

def unique_month(month, possible_birthdays):
    unique_month_counter = 0
    for i in possible_birthdays:
        if month == i[0]:
            unique_month_counter += 1
    if unique_month_counter != 1:
        return False
    return True

def contains_unique_day(month, possible_birthdays):
    days = ()
    true_false = ()
    for i in possible_birthdays:
        if month == i[0]:
            days += (i[1], )

    for j in days:
        if unique_day(j, possible_birthdays):
            true_false += ('True', )
        else:
            true_false += ('False', )
    if 'True' in true_false:
        return True
    return False


def unique_day(day, possible_birthdays):
    count = 0
    for birthday in possible_birthdays:
        if day == birthday[1]:
            count += 1
        else:
            continue
    if count == 1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):
    count = 0
    for birthday in possible_birthdays:
        if month == birthday[0]:
            count +=1
        else:
            continue
    if count == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    for birthday in possible_birthdays:
        if unique_day(birthday[1],possible_birthdays):
            months = birthday[0]
            if months == month:
                return True
            else:
                continue
        else:
            continue
    return False


def unique_day(day, possible_birthdays):
    count = 0
    for k in possible_birthdays:
        if k[1] == day:
            count = count + 1
        else:
            continue
    if count == 1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):
    count = 0
    for k in possible_birthdays:
        if k[0] == month:
            count = count + 1
        else:
            continue
    if count == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    for k in possible_birthdays:
        if month == k[0] and unique_day(k[1], possible_birthdays)==True:
            return True
    return False


def unique_day(date, possible_birthdays):
    count = 0
    for i in possible_birthdays:
        if date == i[1]:
            count += 1
    return count == 1

def unique_month(month, possible_birthdays):
    count = 0
    for birthday in possible_birthdays:
        if month == birthday[0]:
            count += 1
    return count == 1

def contains_unique_day(month, possible_birthdays):
    singlemonthbirthday = ()
    for birthmonth in possible_birthdays:
        if month == birthmonth[0]:
            singlemonthbirthday += (birthmonth,)
    for birthday in singlemonthbirthday:
        if unique_day(birthday[1], possible_birthdays) == True:
            return True
    return False


def unique_day(day, possible_birthdays):

    count = 0

    for i in possible_birthdays:
        if day in i:
            count += 1

    if count == 1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):

    count = 0

    for i in possible_birthdays:
        if month in i:
            count += 1

    if count == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):

    for i in possible_birthdays:
        if month in i:
            if unique_day(i[1],possible_birthdays):
                return True

    return False


def unique_day(day, possible_birthdays):
    value = 0
    for i in range(0, len(possible_birthdays)):
        if (day == possible_birthdays[i][1]):
            value += 1
    if (value > 1) or (value == 0):
        return False
    else:
        return True

def unique_month(month, possible_birthdays):
    value = 0
    for i in range(0, len(possible_birthdays)):
        if (month == possible_birthdays[i][0]):
            value += 1
    if (value > 1) or (value == 0):
        return False
    else:
        return True

def contains_unique_day(month, possible_birthdays):
    unique_days = ()
    for i in range(0, len(possible_birthdays)):
        if (unique_day(possible_birthdays[i][1], possible_birthdays) == True):
            unique_days += (possible_birthdays[i][1],)
    for j in range(0, len(unique_days)):
        if ((month, unique_days[j]) in possible_birthdays):
            return True
    return False


def unique_day(day, possible_birthdays):
    counter = 0
    for i in possible_birthdays:
        if i[1] == day:
            counter += 1
    if counter == 1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):
    counter = 0
    for i in possible_birthdays:
        if i[0] == month:
            counter += 1
    if counter == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    possible_days = ()
    count = 0
    for i in possible_birthdays:
        if i[0] == month:
            possible_days += (i,)
    for j in possible_days:
        day = j[1]
        if (unique_day(day, possible_birthdays) == True):
            return True
    return False


def unique_day(day, possible_birthdays):

    count = 0

    for i in possible_birthdays:
        if day in i:
            count += 1

    if count == 1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):

    count = 0

    for i in possible_birthdays:
        if month in i:
            count += 1

    if count == 1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):

    for i in possible_birthdays:
        if month in i:
            if unique_day(i[1],possible_birthdays):
                return True

        else:
            continue

    return False


def unique_day(day, possible_birthdays):
    if (tuple(map(lambda x: x[1], possible_birthdays))).count(day) == 1:
        return True
    return False

def unique_month(month, possible_birthdays):
    if (tuple(map(lambda x: x[0], possible_birthdays))).count(month) == 1:
        return True
    return False

def contains_unique_day(month, possible_birthdays):
    b =()
    for p in possible_birthdays:
        if month == p[0]:
            b += (p[1],) #tuple of all the days of that month
    for d in b:
        if unique_day(d, possible_birthdays) == False:
            continue
        return True
    return False


def unique_day(day, possible_birthdays):
    count = 0
    for possible_dates in possible_birthdays:
        if possible_dates[1] == day:
            count += 1
    if count != 1:
        return False
    return True

def unique_month(month, possible_birthdays):
    count = 0
    for possible_dates in possible_birthdays:
        if possible_dates[0] == month:
            count += 1
    if count != 1:
        return False
    return True

def contains_unique_day(month, possible_birthdays):
    possible_days_in_month = ()
    possible_days_in_others = ()
    for possible_dates in possible_birthdays:
        if possible_dates[0] == month:
            possible_days_in_month += (possible_dates[1],)
        else:
            possible_days_in_others += (possible_dates[1],)
    for day_in_month in possible_days_in_month:
        unique = True
        for day_in_others in possible_days_in_others:
            if day_in_month == day_in_others:
                unique = False
                break
        if unique == True:
            return True
    return False


def unique_day(date, possible_birthdays):
    counter=0
    for i in possible_birthdays:
        if i[1]==date:
            counter+=1
        else:
            counter=counter
    if counter==1:
        return True
    else:
        return False

def unique_month(month, possible_birthdays):
    counter=0
    for date in possible_birthdays:
        if date[0]==month:
            counter+=1
        else:
            counter=counter
    if counter==1:
        return True
    else:
        return False

def contains_unique_day(month, possible_birthdays):
    date=()
    for mon in possible_birthdays:
        if month ==mon[0]:
            date+=(mon,)
        else:
            date=date
    days=()
    for day in date:
        days+=(day[1],)
    y=()
    for x in days:
        if unique_day(x, possible_birthdays)==True:
            y+=(x,)
        else:
            y=y
    if y==():
        return False
    else:
        return True