def maximum(n):
    if len(n) == 1:
        return n[0]
    else:
        min_ret = minimum(n[1:])
        return n[0] if n[0] > min_ret else min_ret

def maximum(l):
    if len(l) == 1:
        return l[0]
    else:
        maxi = maximum(l[1:])
        return l[0] if l[0] > maxi else maxi

Return the maximum element in a list of numbers.


def reverse(a):
    rev = []
    i = 0
    while i < len(a):
        rev.append(a[len(a) - i])
        i = i + 1
    print(rev)

def reverse(a):
    rev = []
    i = 0
    while i < len(a):
        rev.append(a[len(a) - i - 1])
        i = i + 1
    return rev

# tags: index-overbound-in-iteration, printing-instead-of-returning

Reverse a list of elements.


def reverse(a):
    rev = []
    i = 0
    while i < len(a):
        rev.append(a[len(a) - i])
        i = i + 1
    print(rev.rstrip())

# tags: printing-instead-of-returning, missing-return, index-overbound-in-iteration

Reverse a list of elements.


def reverse(a):
    rev = []
    i = 0
    while i < len(a):
        rev.append(a[len(a) - i])
        i = i + 1
    print(rev.strip())

Reverse a list of elements.


Reverse a list of elements.


def reverse(a):
    rev = []
    i = 0
    while i < len(a):
        rev.append(a[len(a) - i])
        i = i + 1
    return rev

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        print(a[len(a) - i - 1])
        i = i + 1

Reverse a list of elements.


def reverse(a):
    rev = []
    for i in len(a):
        rev.append(a[len(a) - i - 1])
    return rev

def reverse(a):
    rev = []
    for i in range(len(a)):
        rev.append(a[len(a) - i - 1])
    return rev

Reverse a list of elements.


def reverse(a):
    rev = []
    i = 0
    for i in len(a):
        rev.append(a[len(a) - i - 1])
    return rev

def reverse(a):
    rev = []
    i = 0
    for i in range(len(a)):
        rev.append(a[len(a) - i - 1])
    return rev

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1]
        i = i + 1
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i = i + 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    t = a[i]
    a[i] = a[j]
    a[j] = t

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i = i + 1
    return a

Reverse a list of elements.


def reverse(a):
    j = 0
    i = len(a) - 1
    while j < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        j = j + 1
        i = i + 1
    return a

def reverse(a):
    j = 0
    i = len(a) - 1
    while j < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        j = j + 1
        i = i - 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    while j < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        j = j + 1
        i = i + 1
    return a

def reverse(a):
    j = 0
    i = len(a) - 1
    print(swap(a, i, j))

def swap(a, i, j):
    while j < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        j = j + 1
        i = i - 1
    return a

def reverse(a):
    j = 0
    i = len(a) - 1
    return swap(a, i, j)

# tags: printing-instead-of-returning, missing-adjustment-of-loop-value

Reverse a list of elements.


def swap(a, i, j):
    while j < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        j = j + 1
        i = i - 1
    return a

def reverse(a):
    j = 0
    i = len(a) - 1
    print(swap(a, i, j))

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        tmp = a[i]
        a[i] = a[-i]
        a[-i] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[-i - 1]
        a[-i - 1] = tmp
        i += 1
    return a

# tags: iterating-whole-list-while-swapping, incorrect-index-in-negative-lookup, missing-return, missing-adjustment-of-loop-value

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        tmp = a[i]
        a[i] = a[-i]
        a[-i] = tmp
        i += 1

# tags: iterating-whole-list-while-swapping, incorrect-index-in-negative-lookup, missing-return

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, a[i], a[j])
        i = i + 1
        j = j - 1
    return a

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = a[len(a) - i]
        swap(a, i, j)
        i = i + 1

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - i - 1
        swap(a, i, j)
        i = i + 1
    return a

# tags: incorrect-swap-index, missing-return, index-overbound-in-iteration

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[-i]
        a[-i] = tmp
        i += 1

# tags: off-by-one-in-negative-lookup, missing-return

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = a[len(a) - 1 - i]
        swap(a, i, j)
        i = i + 1

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i = i + 1
    return a

# tags: incorrect-swap-index, missing-return

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = a[len(a) - i - 1]
        swap(a, i, j)
        i = i + 1

# tags: impartial-solution, missing-swap-function

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - 1 - i] = tmp
        i += 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, a[i], a[j])
        i = i + 1
        j = len(a) - i - 1
    return a

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = len(a) - i - 1
    return a

Reverse a list of elements.


Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = a[len(a) - i - 1]
        swap(a, i, j)
        i = i + 1
    return a

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - i - 1
        swap(a, i, j)
        i = i + 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i += 1

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        a[i] = a[len(a) - 1 - i]
        i += 1

def reverse(a):
    i = 0
    b = []
    while i < len(a):
        b.append(a[len(a) - 1 - i])
        i += 1
    return b

# tags: overriding-values, not-using-swap, not-using-a-temporary-list, maybe-assuming-swap-in-assignment

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        tmp = a[i]
        a[i] = a[len(a) - 1 - i]
        a[len(a) - 1 - i] = tmp
        i += 1

def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - 1 - i]
        a[len(a) - 1 - i] = tmp
        i += 1
    return a

# tags: iterating-whole-list-while-swapping, missing-return

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a)
    while i < len(a) / 2:
        func_reverse.swap(a, i, j)
        i += 1
        j -= 1

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j -= 1
    return a

# tags: missing-return, incorrect-function-name, index-overbound-in-iteration

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a)
    while i < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        j = j + 1

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        j = j - 1
    return a

# tags: index-overbound-in-iteration, missing-return, incorrect-adjustment-of-temporary-value

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a)
    while i < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        j = j - 1

# tags: missing-return, index-overbound-in-iteration

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a) - 1
    j = j + 1
    while i != 0 and j < len(a):
        swap(a, i, j)
        i = i - 1
        j = j + 1
    return a

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a) - 1
    j = 0
    while j < len(a) / 2:
        swap(a, i, j)
        i = i - 1
        j = j + 1
    return a

# tags: flawed-iteration-continuation-check, iterating-whole-list-while-swapping, invalid-loop-variable-initiation

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        tmp = a[len(a) - 1 - i]
        a[len(a) - 1 - i] = a[i]
        a[i] = tmp
        i += 1

def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[len(a) - 1 - i]
        a[len(a) - 1 - i] = a[i]
        a[i] = tmp
        i += 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a) - 1
    j = 0
    while i != 0 and j < len(a):
        swap(a, i, j)
        i = i - 1
        j = j + 1
    return a

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a) - 1
    j = 0
    while i != 0 and j < len(a) / 2:
        swap(a, i, j)
        i = i - 1
        j = j + 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[len(a) - 1 - i]
        a[len(a) - 1 - i] = a[i]
        a[i] = tmp
        i += 1

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a)
    while i < len(a):
        tmp = a[j - i]
        a[j - i] = a[i]
        a[i] = tmp
        i = i + 1

# tags: index-overbound-in-iteration, iterating-whole-list-while-swapping, missing-adjustment-of-temporary-value

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a)
    if len(a) == 1:
        return a
    else:
        while i < len(a):
            tmp = a[j - i]
            a[j - i] = a[i]
            a[i] = tmp
            i = i + 1

def reverse(a):
    i = 0
    j = len(a) - 1
    if len(a) == 1:
        return a
    else:
        while i < len(a) / 2:
            tmp = a[j - i]
            a[j - i] = a[i]
            a[i] = tmp
            i = i + 1
    return a

# tags: index-overbound-in-iteration, missing-return, iterating-whole-list-while-swapping

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        tmp = a[len(a) - i]
        a[len(a) - i] = a[i]
        a[i] = tmp
        i = i + 1

def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[len(a) - i - 1]
        a[len(a) - i - 1] = a[i]
        a[i] = tmp
        i = i + 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a):
        swap(a, i, j)
    i += 1
    j = j - 1

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j = j - 1
    return a

# tags: missing-return, iterating-whole-list-while-swapping, incorrect-indentation-in-loop-value

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a)
    if len(a) == 1:
        return a
    else:
        while i < len(a):
            tmp = a[j - i - 1]
            a[j - i - 1] = a[i]
            a[i] = tmp
            i = i + 1

def reverse(a):
    i = 0
    j = len(a)
    if len(a) == 1:
        return a
    else:
        while i < len(a) / 2:
            tmp = a[j - i - 1]
            a[j - i - 1] = a[i]
            a[i] = tmp
            i = i + 1
    return a

# tags: missing-return, iterating-whole-list-while-swapping

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a):
        swap(a, i, j)
        i += 1
        j = j - 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j = j - 1

Reverse a list of elements.


Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        j = len(a) - i - 1
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - i - 1
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
    return a

# tags: iterating-whole-list-while-swapping, incorrect-indentation-in-return

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1
    return a

# tags: missing-return, missing-temporary-value-initiation, missing-adjustment-of-temporary-value

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        j = j - 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a) - 1
    j = 0
    while i != 0 and j < len(a) and j != i:
        swap()
        i = i - 1
        j = j + 1
    return a

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a) - 1
    j = 0
    while i != 0 and j < len(a) and j < i:
        swap(a, i, j)
        i = i - 1
        j = j + 1
    return a

# tags: missing-function-parameter-in-function-call, flawed-iteration-continuation-check

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
    i = i + 1
    return a

Reverse a list of elements.


def reverse(a, i):
    tmp = a[len(a) - i - 1]
    a[len(a) - i - 1] = a[i]
    a[i] = tmp

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a)
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i = i + 1
        j = j - 1

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i = i + 1
        j = j - 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i = i + 1
        j = j - 1

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while j < len(a) and len(a) > 1:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        j = j - 1
    return a

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2 and len(a) > 1:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        j = j - 1
    return a

# tags: iterating-whole-list-while-swapping, flawed-iteration-continuation-check

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i = i + 1
        return a

Reverse a list of elements.


def swap(a, i, j):
    while j < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        j = j + 1
        i = i + 1
    return a

def reverse(a):
    j = 0
    i = len(a) - 1
    print(swap(a, i, j))

def swap(a, i, j):
    while j < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        j = j + 1
        i = i - 1
    return a

def reverse(a):
    j = 0
    i = len(a) - 1
    return swap(a, i, j)

# tags: printing-instead-of-returning, missing-adjustment-of-loop-value

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while j < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        j = j - 1
    return a

Reverse a list of elements.


def reverse(a):
    j = 0
    i = len(a) - 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j = j - 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        j = len(a) - i - 1
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        j = j - 1
        i = i + 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a):
        swap(a, i, j)
        i = i + 1

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - i - 1
        swap(a, i, j)
        i = i + 1
    return a

# tags: missing-return, incorrect-swap-index, iterating-whole-list-while-swapping, missing-loop-variable-initiation

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        j = j - 1
        i = i + 1
    return a

Reverse a list of elements.


Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a):
        j = len(a) - 1 - i
        swap(a, i, j)
        i = i + 1

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i = i + 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while j > len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i += 1
        j = j - 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    while i < len(a):
        swap(a, i, j)
        i = i + 1

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1
    return a

# tags: iterating-whole-list-while-swapping, missing-loop-variable-initiation, incorrect-swap-index

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    temp = a[i]
    a[i] = a[j]
    a[j] = temp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < j:
        swap(a, i, j)
        i = i + 1
        j = j - 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while j > len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i += 1
        j = j - 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        return a[len(a) - i - 1]
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while j > len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i += 1
        j = j - 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) + 1
    while i < len(a):
        swap(a, i, j)
        i = i + 1
        j = j - 1

# tags: missing-return, iterating-whole-list-while-swapping, index-overbound

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i += 1
        j = j - 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while j > len(a) / 2:
        swap(a, i, j)
        i += 1
        j = j - 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j = j - 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i = i + 1

def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i = i + 1
    return a

# tags: iterating-whole-list-while-swapping, missing-return

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i = i + 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = a[len(a) - i - 1]
        swap(a, i, j)
        i = i + 1

# tags: missing-return, incorrect-swap-index

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        tmp = a[i]
        a[i] = a[len(a) - 1 - i]
        a[len(a) - 1 - i] = tmp
        i = i + 1
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - 1 - i]
        a[len(a) - 1 - i] = tmp
        i = i + 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i = i + 1

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1

Reverse a list of elements.


def swap(a, i, j):
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i = i + 1
        j = j - 1
    return a

def reverse(a):
    i = 0
    j = len(a) - 1
    swap(a, i, j)

def swap(a, i, j):
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i = i + 1
        j = j - 1
    return a

def reverse(a):
    i = 0
    j = len(a) - 1
    return swap(a, i, j)

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        print(a[len(a) - i - 1])
        i = i + 1

Reverse a list of elements.


Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i = i + 1
        j = j - 1
    return a

Reverse a list of elements.


def reverse(a):
    m = len(a) - i - 1
    return m

Reverse a list of elements.


def reverse(a):
    m = len(a) - i - 1
    return m
    i = i + 1

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        return a[len(a) - i - 1]
        i = i + 1

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1]
        i = i + 1
    return a

# tags: iterating-whole-list-while-swapping, missing-temp-assignment-in-swap

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - i - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j + j + 1
    return a

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - i - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1
    return a

# tags: typo, incorrect-adjustment-of-temporary-value

Reverse a list of elements.


def reverse(a):
    t = ''
    while j < len(i):
        t = a[j] + t
        j = j + 1
        return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j + j - 1
    return a

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while j < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1

# tags: missing-return, wrong-loop-variable

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 1
    while i < len(a):
        j = i + 1
        swap(a, i, j)
        i += 1
    return a

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - i - 1
        swap(a, i, j)
        i += 1
    return a

# tags: iterating-whole-list-while-swapping, incorrect-swap-index, incorrect-adjustment-of-temporary-value, invalid-loop-variable-initiation

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a):
        swap(a, i, j)
        i = i + 1
        j = j - 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) - 1:
        j = i + 1
        swap(a, i, j)
        i += 1
    return a

# tags: iterating-whole-list-while-swapping, incorrect-swap-index, incorrect-adjustment-of-temporary-value

Reverse a list of elements.


def reverse(a):
    x = len(a) - i - 1
    return x

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - i - 1
        swap(a, i, j)
        i = i + 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = a[0]
    j = len(a) - 1
    while i < j:
        a = swap(a)
    i = i + 1
    j = j - 1

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < j:
        swap(a, i, j)
        i = i + 1
        j = j - 1
    return a

# tags: invalid-loop-variable-initiation, missing-function-parameter-in-function-call, missing-return, incorrect-indentation-in-loop-value, invalid-array-assignment

Reverse a list of elements.


Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = int(a[len(a) - i - 1])
        swap(a, i, j)
    i = i + 1

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - i - 1
        swap(a, i, j)
        i = i + 1
    return a

# tags: missing-return, incorrect-swap-index, incorrect-indentation-in-loop-value

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i += 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    tmp = a[j]

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i = i + 1

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i = i + 1
    return a

# tags: missing-return, invalid-temp-variable-usage

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j -= 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = a[len(a) - i - 1]
        swap(a, i, j)
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i += 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        j -= 1
        i += 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = -1
    while i < len(a):
        swap(a, i, j)
        i += 1

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = -1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j = j - 1
    return a

# tags: iterating-whole-list-while-swapping, missing-return, missing-adjustment-of-loop-value

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j = j - 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = a[0]
    j = len(a) - 1
    while i < j:
        a = swap(a)
        i = i + 1
        j = j - 1

# tags: invalid-loop-variable-initiation, missing-return, missing-function-parameter-in-function-call, invalid-array-assignment

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1
    return a

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1
    return a

# tags: missing-return, missing-loop-variable-initiation

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - i - 1
        swap(a, i, j)
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < j:
        swap(a)
        i = i + 1
        j = j - 1

# tags: missing-function-parameter-in-function-call, missing-return

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1
        return a

# tags: missing-loop-variable-initiation, incorrect-indentation-in-return

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < j:
        swap(a, i, j)
        i = i + 1
        j = j - 1

Reverse a list of elements.


Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1
        return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = a[len(a) - 1]
    while i < len(a):
        swap(a, i, j)
        i = i + 1
        j = j - 1

# tags: iterating-whole-list-while-swapping, missing-return, invalid-loop-variable-initiation

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = -1
    while i < len(a / 2):
        swap(a, i, j)
        i += 1
        j -= 1

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = -1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j -= 1
    return a

# tags: missing-return, invalid-use-of-len

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = -1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j -= 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = -1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < j:
        swap(a, i, j)
        i += 1
        j -= 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < 2 % len(a):
        swap(a, i, j)
        j = j - 1
        i = i + 1
    return a

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        j = j - 1
        i = i + 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    if a != []:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        return a
    else:
        return a

def reverse(a):
    i = 0
    j = len(a) - 1
    if a != []:
        while i < 2 % len(a):
            swap(a, i, j)
            j = j - 1
            i = i + 1
        return a
    else:
        return a

def swap(a, i, j):
    if a != []:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        return a
    else:
        return a

def reverse(a):
    i = 0
    j = len(a) - 1
    if a != []:
        while i < len(a) / 2:
            swap(a, i, j)
            j = j - 1
            i = i + 1
        return a
    else:
        return a

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        a[tmp] = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = a[tmp]
        i = i + 1

def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i = i + 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        b.append(a[len(a) - 1 - i])
        i = i + 1
    return b

def reverse(a):
    i = 0
    b = []
    while i < len(a):
        b.append(a[len(a) - 1 - i])
        i = i + 1
    return b

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        a = a + a[len(a) - i - 1]
        i = i + 1
    return a

def reverse(a):
    i = 0
    b = []
    while i < len(a):
        b.append(a[len(a) - i - 1])
        i = i + 1
    return b

# tags: missing-temporary-array-initiation, invalid-list-concatenation, not-using-a-temporary-list

Reverse a list of elements.


def reverse(a):
    i = 0
    t = []
    while i < len(a):
        t = t + a[len(a) - i - 1]
        i = i + 1
    return t

def reverse(a):
    i = 0
    t = []
    while i < len(a):
        t.append(a[len(a) - i - 1])
        i = i + 1
    return t

# tags: invalid-list-concatenation, missing-list-append

Reverse a list of elements.


def swap(a, i, j):
    if a != []:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        return a
    else:
        return a

def reverse(a):
    i = 0
    j = len(a) - 1
    if a != [] and len(a) > 2:
        while i < 2 % len(a):
            swap(a, i, j)
            j = j - 1
            i = i + 1
        return a
    elif len(a) <= 2 and len(a) > 0:
        swap(a, i, j)
        return a
    else:
        return a

def swap(a, i, j):
    if a != []:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        return a
    else:
        return a

def reverse(a):
    i = 0
    j = len(a) - 1
    if a != [] and len(a) > 2:
        while i < len(a) / 2:
            swap(a, i, j)
            j = j - 1
            i = i + 1
        return a
    elif len(a) <= 2 and len(a) > 0:
        swap(a, i, j)
        return a
    else:
        return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(l):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j -= 1

# tags: missing-return, mismatch-between-parameter-and-variable-names

Reverse a list of elements.


def swap(a, i, j):
    tmp = i
    i = j
    j = tmp

def reverse(a):
    while i < j:
        swap(a, i, j)
        i = i + 1
        j = j - 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j -= 1

Reverse a list of elements.


Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i = i + 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        j = j - 1
        i = i + 1
    return a

Reverse a list of elements.


def reverse(a):
    a = a[::-1]
    return a

Reverse a list of elements.


def reverse(a):
    a[::-1]
    return a

Reverse a list of elements.


def reverse(a):
    a.reverse()
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        b.append(a[len(a) - 1 - i])
        i = i + 1
    a = b
    return a

def reverse(a):
    i = 0
    b = []
    while i < len(a):
        b.append(a[len(a) - 1 - i])
        i = i + 1
    a = b
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = -1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j -= 1
    return a

Reverse a list of elements.


def reverse(a):
    print(a[::-1])
    return

# tags: missing-assignment, missing-return-value

Reverse a list of elements.


def reverse(a):
    print(a[::-1])
    return a

Reverse a list of elements.


# tags: printing-instead-of-returning, missing-return

Reverse a list of elements.


# tags: returning-none-by-accident, missing-return

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    tmp1 = a[j]
    a[i] = tmp1
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - i - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
    return a

def swap(a, i, j):
    tmp = a[i]
    tmp1 = a[j]
    a[i] = tmp1
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - i - 1
        swap(a, i, j)
        i = i + 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a[i], a[j]

def reverse(a):
    i = 0
    j = len(a) - i - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
    return a

def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a[i], a[j]

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - i - 1
        swap(a, i, j)
        i = i + 1
    return a

Reverse a list of elements.


def search(str, letter):
    if letter in str:
        print('True')
    else:
        print('False')

assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True

def search(str, letter):
    if letter in str:
        return True
    else:
        return False

Return whether a letter is part of a string


def search(str, letter):
    for letters in str:
        if letters in str:
            print('True')
        else:
            print('False')

# LH # tags: print-instead-of-return, extra-loop, wrong-comparison


def search(str, letter):
    for letters in str:
        if letter in str:
            print('True')
        else:
            print('False')

# LH # tags: print-instead-of-return, extra-loop


def search(str, letter):
    if letter in str:
        return 'True'
    else:
        return 'False'


def index(str, letter):
    if letter in str:
        i = 0
        while i < len(str):
            if letter == str[i]:
                return i
            i = i + 1
    else:
        return '-1'

def index(str, letter):
    if letter in str:
        i = 0
        while i < len(str):
            if letter == str[i]:
                return i
            i = i + 1
    else:
        return -1

# KC# return string instead of interger value

Returns the position of letter in str, -1 if it is not there.


def search(str, letter):
    B = False
    A = True
    for letters in str:
        statement = A
        while statement != A:
            if letter in letters:
                print(A)
                statement = B
            else:
                print(B)

def search(str, letter):
    return letter in str

# LH # tags:  wonky-solution. nonsense-solution


def search(str, letter):
    if letter in str:
        print(True)
    else:
        print(False)


def search(letter):
    str = input()
    letter = input()
    if letter in str:
        print(True)
    else:
        print(false)

# LH # tags:  asking-user-input, print-instead-of-return, syntax-error, missing-parameter


def search(str, letter):
    for letter in str:
        return True

def search(str, search_letter):
    for letter in str:
        if letter == search_letter:
            return True
    return False


def search(letter):
    str = input()
    if letter in str:
        print(True)
    else:
        print(false)

# LH # tags: print-instead-of-return, asking-user-input, syntax-error


def search(letter):
    str = input()
    if letter in str:
        return True
    else:
        return false

# LH # tags:  asking-user-input, syntax-error,  missing-parameter


def search(string, letter):
    if letter not in string:
        return 'False'
    else:
        return 'True'

def search(string, letter):
    if letter not in string:
        return False
    else:
        return True


def search(ls, val):
    if ls == []:
        return -1
    elif ls[0] == val:
        return val
    else:
        return search(ls[1:], val)

def search(ls, val):
    if len(ls) == 0:
        return False
    elif ls[0] == val:
        return True
    else:
        return search(ls[1:], val)

# LH # tags: compare-string-to-empty-list, wrong-return-value


def search(str, letter):
    for letter in str:
        if letter in str:
            return True
        else:
            return False


def search(str, letter):
    if letter in str:
        print(True)
    if letter not in str:
        print(False)

def search(str, letter):
    if letter in str:
        return True
    if letter not in str:
        return False


def search(str, letter):
    if letter in str:
        return true
    else:
        return false


def search(string, letter):
    if letter == string:
        return 'True'
    else:
        search(string[1:], letter)
    return 'False'

def search(string, letter):
    if len(string) > 0:
        if letter == string[0]:
            return True
        else:
            return search(string[1:], letter)
    else:
        return False

# LH # tags: wrong-return-type, missing-recursive-return, wrong-comparison


def search(str, letter):
    i = 0
    if len(str) == 0:
        return False
    elif str[0] == letter:
        return True
    else:
        search(str[1:], letter)

def search(str, letter):
    i = 0
    if len(str) == 0:
        return False
    elif str[0] == letter:
        return True
    else:
        return search(str[1:], letter)


def search(str, letter):
    if str == []:
        return 'False'
    elif str[0] == letter:
        return 'True'
    else:
        return search(str[1:], letter)

def search(str, letter):
    if len(str) == 0:
        return False
    elif str[0] == letter:
        return True
    else:
        return search(str[1:], letter)

# LH # tags: compare-string-to-empty-list. wrong-return-type


def search(str, letter):
    if str == []:
        return False
    elif str[0] == letter:
        return True
    else:
        return search(str[1:], letters)

# LH # tags: compare-string-to-empty-list, wrong-variable-name


def search(str, letter):
    if letter in str:
        print('True')
    else:
        print('False')


def search(str, letter):
    if letter in str:
        print('True')

def search(str, letter):
    if letter in str:
        return True
    return False


def search(str, letter):
    if letter in str:
        return 'True'
    else:
        return 'False'


def search(str):
    if letter in str:
        return 'True'
    else:
        return 'False'

# LH # tags: wrong-return-type, missing-parameter


def search(string, letter):
    string = input()
    letter = input()
    if letter not in string:
        print('False')
    else:
        print('True')

# LH # tags: print-instead-of-return, asking-user-input


def search(string, letter):
    if letter not in string:
        print('False')
    else:
        print('True')


def search(ls, val, na=0):
    pos = len(ls)
    if pos == len(ls):
        return False
    elif ls[pos] == val:
        return True
    else:
        return search(ls, val, pos + 1)

# LH # tags: adding-additional-parameter


def search(str, letter):
    i = 0
    if letter == str[i]:
        return 'True'
    else:
        return 'False'

def search(str, letter):
    i = 0
    while i < len(str):
        if letter == str[i]:
            return True
        i += 1
    return False

# LH # tags: wrong-return-type, missing-loop


def search(str, letter):
    i = 0
    if letter == str[i]:
        return 'True'
    else:
        return 'False'
        i = i + 1

def search(str, letter):
    i = 0
    while i < len(str):
        if str[i] == letter:
            return True
        i = i + 1
    return False

# LH # tags: wrong-return-type, non-recursive-solution, wonky-solution


def search(str, letter):
    if str == []:
        return False
    elif str[0] == letter:
        return True
    else:
        search(str[1:], letter)

def search(string, letter):
    if len(string) == 0:
        return False
    elif string[0] == letter:
        return True
    else:
        return search(string[1:], letter)

# LH # tags: compare-string-to-empty-list, missing-recursive-return


def search(str, letter):
    if str[-1] != a:
        return False
    elif str[0] == letter:
        return True
    else:
        return search(str[1:], letter)

def search(str, letter):
    if str == '':
        return False
    elif str[0] == letter:
        return True
    else:
        return search(str[1:], letter)

# LH # tags: missing-base-case, wrong-base-case


def search(str, letter):
    if str[-1] != letter:
        return False
    elif str[0] == letter:
        return True
    else:
        return search(str[1:], letter)


def search(str, letter):
    if str == []:
        return False
    elif lstr[0] == letter:
        return True
    else:
        return search(str[1:], letter)

def search(lstr, letter):
    if len(lstr) == 0:
        return False
    elif lstr[0] == letter:
        return True
    else:
        return search(lstr[1:], letter)


def index(str, letter):
    if letter in str:
        i = 0
        while i < len(str):
            if letter == str[i]:
                return i
            i = i + 1
    else:
        return '-1'


def search(string, letter):
    if string == []:
        print('False')
    elif string[0] == letter:
        print('True')
    else:
        search(string[1:], letter)

def search(string, letter):
    if string == '':
        return False
    elif string[0] == letter:
        return True
    else:
        return search(string[1:], letter)

# LH # tags: compare-string-to-empty-list, print-instead-of-return, missing-recursive-return


def search(string, letter):
    if string == ' ':
        return 'False'
    elif string[0] == letter:
        return 'True'
    else:
        return search(string[1:], letter)

# LH # tags: wrong-comparison, wrong-return-type


def search(string, letter):
    if string == '':
        return 'False'
    elif string[0] == letter:
        return 'True'
    else:
        return search(string[1:], letter)


def search(str, letter):
    if letter in str:
        return True
    else:
        return False


def search(string, letter):
    if letter in string:
        return 'True'
    if letter not in string:
        return 'False'

def search(string, letter):
    if letter in string:
        return True
    if letter not in string:
        return False


def search(string, letter):
    if letter not in string:
        return 'False'
    else:
        return 'True'


def search(str, letter):
    if letter in str:
        return 'True'
    else:
        return 'False'


def search(string, letter):
    if string[0] == letter:
        return 'True'
    else:
        return 'False'
        return search(string[1:], letter)

# LH # tags: missing-base-case, wrong-return-type, extra-return-statement


def search(string, letter):
    if string[0] == letter:
        return 'True'
    else:
        return search(string[1:], letter)
    return 'False'

# LH # tags: missing-base-case, wrong-return-type, extra-return


def search(string, letter):
    if string[0] == letter:
        return 'True'
    else:
        return search(string[1:], letter)
    if letter not in string:
        return 'False'

def search(string, letter):
    if string == '':
        return False
    if string[0] == letter:
        return True
    else:
        return search(string[1:], letter)

# LH # tags: missing-base-case, wrong-return-type, extra-non-recursive-solution


def search(string, letter):
    if string[0] == letter:
        return 'True'
    else:
        return search(string[1:], letter)
    if letter not in string:
        print('False')


def search(string, letter):
    if string[0] == letter:
        return 'True'
    else:
        print('False')
        return search(string[1:], letter)

# LH # tags: print-instead-of-return, wrong-return-type, extra-print


def search(string, letter):
    if string[0] == letter:
        return 'True'
    else:
        return search(string[1:], letter)
        print('False')

# LH # tags: missing-base-case, wrong-return-value, extra-print


def search(str, letter):
    if letter in str:
        return 'True'
    else:
        return 'False'
    i = 0
    while i < len(str):
        if str[i] == letter2:
            return i
        i += 1
    return '-1'

# LH # tags: wrong-return-type, non-recursive-solution, extra-code


def search(string, letter):
    if string[0] == letter:
        return 'True'
    else:
        return search(string[1:], letter)
    print('False')

# LH # tags: missing-base-case, wrong-return-type, extra-print


def index(str, letter, pos):
    if pos == len(str):
        return 'False'
    elif str[pos] == letter:
        return 'True'
    else:
        return search(str, letter, pos + 1)

def search(str, letter):
    i = 0
    while i < len(str):
        if str[i] == letter:
            return 'True'
        i = i + 1
    return 'False'

# LH # tags: wrong-return-type, non-recursive-solution


def search(ls, val, na=0):
    pos = len(ls)
    if pos == len(ls):
        return False
    elif ls[pos] == val:
        return True
    else:
        return search(ls, val, pos + 1)


def index(str, letter, pos):
    i = str[0]
    pos = 1
    while i < len(str):
        if letter in str:
            letter_pos = i + 1
        i = i + 1
    return letter_pos

def search(str, letter):
    i = 0
    while i < len(str):
        if str[i] == letter:
            return 'True'
        i = i + 1
    return 'False'

# LH # tags: wrong-return-type, non-recursive-solution-


def index(str, letter, pos):
    i = str[0]
    pos = 1
    while i < len(str):
        if letter in str:
            pos = i + 1
        i = i + 1
    return pos

def search(str, letter):
    i = 0
    while i < len(str):
        if str[i] == letter:
            return 'True'
        i = i + 1
    return 'False'


def index(str, letter, pos):
    i = str[0]
    pos = 1
    while i < len(str):
        if letter in str:
            pos = i + 1
        i = i + 1
    return pos
    return '-1'

def search(str, letter):
    i = 0
    while i < len(str):
        if str[i] == letter:
            return 'True'
        i = i + 1
    return 'False'


def index(str, letter, pos):
    i = str[0]
    pos = 1
    while i < len(str):
        if letter in str:
            pos = i + 1
            return pos
        i = i + 1
    return '-1'

def search(str, letter):
    i = 0
    while i < len(str):
        if str[i] == letter:
            return 'True'
        i = i + 1
    return 'False'


def index(str, letter, pos):
    i = str[0]
    pos = 1
    while i < len(str):
        if letter in str:
            pos = i + 1
            return pos
        i = i + 1
        if letter not in str:
            return '-1'

def search(str, letter):
    i = 0
    while i < len(str):
        if str[i] == letter:
            return 'True'
        i = i + 1
    return 'False'


def index(str, letter, pos):
    i = str[0]
    pos = 1
    while i < len(str):
        if letter in str:
            pos = i + 1
            return -1
        i = i + 1
    return '1'

def search(str, letter):
    i = 0
    while i < len(str):
        if str[i] == letter:
            return 'True'
        i = i + 1
    return 'False'


def index(str, letter, pos):
    i = str[0]
    pos = 1
    while i < len(str):
        if letter in str:
            pos = i + 1
            return pos
        else:
            return '-1'

def search(str, letter):
    i = 0
    while i < len(str):
        if str[i] == letter:
            return 'True'
        i = i + 1
    return 'False'


def index(str, letter, pos):
    i = str[0]
    pos = 1
    while i < len(str):
        if letter in str:
            pos = i + 1
            return pos
        i = i = 1
    return '-1'

def search(str, letter):
    i = 0
    while i < len(str):
        if str[i] == letter:
            return 'True'
        i = i + 1
    return 'False'


def index(str, letter, pos):
    i = str[0]
    pos = 1
    while i < len(str):
        if letter in str:
            pos = i + 1
            return pos
        i = i + 1
    return '1'

def search(str, letter):
    i = 0
    while i < len(str):
        if str[i] == letter:
            return 'True'
        i = i + 1
    return 'False'


def search(str, letter):
    if letter in str:
        return 'True'
    else:
        return 'False'


def search(string, letter):
    if letter not in string:
        return 'False'
    else:
        return 'True'


def search(str, letter):
    if letter in str:
        print('True')
    else:
        print('False')


def sumup(n):
    if n == 1:
        return 1
    sum_to_n_1 = sumup(n - 1)
    return n + sum_to_n_1

assert sumup(0)==0 and sumup(1)==1 and sumup(2)==3 and sumup(10)==55 and sumup(27)==378

def sumup(n):
    if n == 0:
        return 0
    sum_to_n_1 = sumup(n - 1)
    return n + sum_to_n_1

Return the sum of all integers up to n.


Return the sum of all integers up to n.


def sumup(n):
    total = 0
    for i in range(n):
        total + i
    return total + n

def sumup(n):
    total = 0
    for i in range(n):
        total = total + i
    return total + n

Return the sum of all integers up to n.


def maximum(l):
    sorted(l)
    return l(len(l) - 1)
    return maximum(l)

def maximum(l):
    l = sorted(l)
    return l[len(l) - 1]


def maximum(l):
    l = sorted(l)
    if l[len(l) - 1] > l[len(l) - 2]:
        return l[0]
    return maximum(l)

def maximum(l):
    l = sorted(l)
    return l[-1]


def maximum(l):
    l = sorted(l)
    if l[len(l) - 1] > l[len(l) - 2]:
        return l[len(l) - 1]
    return maximum(l)

def maximum(l):
    l = sorted(l)
    if len(l) == 1:
        return l[0]
    if l[len(l) - 1] > l[len(l) - 2]:
        return l[len(l) - 1]
    return maximum(l)


Return the minimum element in a list of numbers.


def minimum(l):
    if len(l) == 1:
        return l[0]
    if a[-2] < a[-1]:
        return minimum(a[:-1])
    else:
        return minimum(a[:-2] + a[-1:])

def minimum(l):
    if len(l) == 1:
        return l[0]
    if l[-2] < l[-1]:
        return minimum(l[:-1])
    else:
        return minimum(l[:-2] + l[-1:])

# KC# wrong variable usage - mixing variables


def minimum(a):
    if len(a) == 1:
        return a[0]
    if a[-2] > a[-1]:
        return minimum(a[:-1])
    else:
        return minimum(a[:-2] + a[-1:])

def minimum(a):
    if len(a) == 1:
        return a[0]
    if a[-2] < a[-1]:
        return minimum(a[:-1])
    else:
        return minimum(a[:-2] + a[-1:])


def maximum(a):
    if len(a) == 1:
        return a[0]
    if a[0] > minimum(a[1:]):
        return a[0]
    else:
        return minimum(a[1:])

def maximum(a):
    if len(a) == 1:
        return a[0]
    if a[0] > maximum(a[1:]):
        return a[0]
    else:
        return maximum(a[1:])


def maximum(a):
    if len(a) == 1:
        return a[0]
    if a[0] > maximun(a[1:]):
        return a[0]
    else:
        return maximum(a[1:])


def maximum(a):
    if len(a) == 1:
        return a[0]
    biggest = minimum(a[1:])
    if a[0] > biggest:
        return a[0]
    else:
        return biggest

def maximum(a):
    if len(a) == 1:
        return a[0]
    biggest = maximum(a[1:])
    if a[0] > biggest:
        return a[0]
    else:
        return biggest


def maximum(a):
    if len(a) == 1:
        return a[0]
    head = a[0]
    tail = a[1:]
    mintail = minimum(tail)
    if head < mintail:
        smallest = mintail
    else:
        smallest = head
    return smallest

def maximum(a):
    if len(a) == 1:
        return a[0]
    head = a[0]
    tail = a[1:]
    maxtail = maximum(tail)
    if head < maxtail:
        biggest = maxtail
    else:
        biggest = head
    return biggest


def maximum(l, i=0):
    j = i
    while j < len(l) and l[j] > l[-1]:
        j += 1
    if j < len(l):
        tmp = l[i]
        l[i] = l[j]
        l[j] = tmp
    if j > len(l):
        return l[-1]
    return minimum(l, i + 1)

def maximum(l, i=0):
    j = i
    while j < len(l) and l[j] > l[-1]:
        j += 1
    if j < len(l):
        tmp = l[i]
        l[i] = l[j]
        l[j] = tmp
    if j > len(l):
        return l[-1]
    return maximum(l, i + 1)


def sumup(x):
    x = x + sumup(x)
    return x

def sumup(x):
    if x == 0:
        return 0
    x = x + sumup(x - 1)
    return x

# tags: infinite-recursion, not-guarding-for-zero, missing-reducing-in-recursion

Return the sum of all integers up to n.


def maximum(a):
    if len(a) == 1:
        return a[0]
    if a[0] > a[1]:
        a.append(a[0])
    return minimum(a[1:])

def maximum(a):
    if len(a) == 1:
        return a[0]
    if a[0] > a[1]:
        a.append(a[0])
    return maximum(a[1:])


def maximum(l):
    max = 0
    if len(l) == 1:
        return l[0]
    elif l[0] > l[1]:
        return maximum.pop(l[1])
    else:
        return maximum.pop(l[0])

def maximum(l):
    max = 0
    if len(l) == 1:
        return l[0]
    elif l[0] > l[1]:
        l.pop(1)
        return maximum(l)
    else:
        l.pop(0)
        return maximum(l)

# JL# tags: index error, list error, recursion


def maximum(l):
    max = 0
    if len(l) == 1:
        return l[0]
    elif l[0] > l[1]:
        return maximum(l).pop(l[1])
    else:
        return maximum(l).pop(l[0])


def maximum(l):
    if len(l) == 1:
        return l[0]
    elif l[0] > l[1]:
        return maximum(l).pop(l[1])
    else:
        return maximum(l).pop(l[0])

def maximum(l):
    if len(l) == 1:
        return l[0]
    elif l[0] > l[1]:
        l.pop(1)
        return maximum(l)
    else:
        l.pop(0)
        return maximum(l)


def maximum(l):
    if len(l) == 1:
        return l[0]
    elif l[0] > l[1]:
        return maximum(l.pop(l[1]))
    else:
        return maximum(l.pop(l[0]))


def maximum(l):
    if len(l) == 0:
        return 0
    if len(l) == 1:
        return l[0]
    elif l[0] > l[1]:
        return maximum(l.pop(l[1]))
    else:
        return maximum(l.pop(l[0]))

def maximum(l):
    if len(l) == 0:
        return 0
    if len(l) == 1:
        return l[0]
    elif l[0] > l[1]:
        l.pop(1)
        return maximum(l)
    else:
        l.pop(0)
        return maximum(l)


def maximum(l):
    m = 0
    for line in l:
        if line > m:
            m = line
    return m

def maximum(l):
    m = l[0]
    for line in l:
        if line > m:
            m = line
    return m


def maximum(l):
    if len(l) == 1:
        return l[0]
    if l[0] >= maximum(l[1:]):
        return l[0]
    else:
        return maximum(l[n + 1:])

def maximum(l):
    if len(l) == 1:
        return l[0]
    if l[0] >= maximum(l[1:]):
        return l[0]
    else:
        return maximum(l[1:])


def sumup(n):
    sum = 0
    for x in range(0, n):
        sum += x
    return sum

def sumup(n):
    sum = 0
    for x in range(0, n + 1):
        sum += x
    return sum

Return the sum of all integers up to n.


def sumup(n):
    if n == 1:
        return 1
    sum_to_n_1 = sumup(n - 1)
    return n + sum_to_n_1

def sumup(n):
    if n == 0:
        return 0
    sum_to_n_1 = sumup(n - 1)
    return n + sum_to_n_1

Return the sum of all integers up to n.


Return the sum of all integers up to n.


def maximum(a):
    if len(a) == 1:
        return a[0]
    return maximum(a.remove(min(a)))

def maximum(a):
    if len(a) == 1:
        return a[0]
    a.remove(min(a))
    return maximum(a)

# JL# tags: return type issue, recursion


def maximum(a):
    if len(a) == 1:
        return list(a[0])
    return maximum(a.remove(min(a)))


def maximum(n=[]):
    return max(maximum(n))

# JL# tags: infinite recursion, recursion


def maximum(a):
    if len(a) == 1:
        return a[0]
    else:
        large = a[0]
        if a[i] > a[0]:
            a.remove(a[0])
        else:
            a.remove(a[1])
    return maximum(a)

def maximum(a):
    if len(a) == 1:
        return a[0]
    else:
        large = a[0]
        if a[1] > a[0]:
            a.remove(a[0])
        else:
            a.remove(a[1])
    return maximum(a)


def minimum(a):
    if len(a) == 1:
        return n[0]
    else:
        l = minimum(l[1:])
    if l[0] < l:
        return l[0]
    else:
        return l

def minimum(a):
    if len(a) == 1:
        return a[0]
    else:
        l = minimum(a[1:])
    if a[0] < l:
        return a[0]
    else:
        return l


def minimum(a):
    if len(a) == 1:
        return n[0]
    else:
        l = minimum(a[1:])
    if a[0] < l:
        return l[0]
    else:
        return l


def maximum(a):
    if len(a) == 1:
        return a[0]
    else:
        l = maximum(a[1:])
    if a[0] < l:
        return a[0]
    else:
        return l

def maximum(a):
    if len(a) == 1:
        return a[0]
    else:
        l = maximum(a[1:])
    if a[0] > l:
        return a[0]
    else:
        return l

# JL# tags: conditional error, recursion


def sumup(N):
    if N != 0:
        N += N - 1
    return N

def sumup(N):
    if N != 0:
        N += sumup(N - 1)
    return N

Return the sum of all integers up to n.


def minimum(l):
    l = l.sort
    return l[0]

def minimum(l):
    l.sort()
    return l[0]


def minimum(l):
    l = l.sort()
    return l


def maximum(l):
    return sorted(l)[len() - 1]

def maximum(l):
    return sorted(l)[len(l) - 1]


def maximum(l):
    if len(l) == 1:
        return l[0]
    i = 0
    if l[i] < l[i + 1]:
        i += 1
        l = l[i:]
    else:
        l.pop(i + 1)
    return minimum(l)

def maximum(l):
    if len(l) == 1:
        return l[0]
    i = 0
    if l[i] < l[i + 1]:
        i += 1
        l = l[i:]
    else:
        l.pop(i + 1)
    return maximum(l)


def minimum(n):
    m = sorted(n)
    if n[0] == m[0]:
        return n[0]
    return minimum(n)[0]

def minimum(n):
    m = sorted(n)
    return m[0]


def maximum(l):
    if len(l) == 1:
        return l[0]
    f, m = l[0], maximum(l)
    if f > m:
        return f
    else:
        return m

def maximum(l):
    if len(l) == 1:
        return l[0]
    f, m = l[0], maximum(l[1:])
    if f > m:
        return f
    else:
        return m


def minimum(l):
    if len(l) == 1:
        return l[0]
    else:
        m1 = minimum(l[0:len(l) / 2])
        m2 = minimum(l[len(l) / 2:])
        if m1 < m2:
            return m1
        else:
            return m2

def minimum(l):
    if len(l) == 1:
        return l[0]
    else:
        m1 = minimum(l[0:len(l) // 2])
        m2 = minimum(l[len(l) // 2:])
        if m1 < m2:
            return m1
        else:
            return m2


def maximum(l):
    if len(l) == 1:
        return l[0]
    else:
        m1 = minimum(l[:len(l) // 2])
        m2 = minimum(l[len(l) // 2:])
        if m1 > m2:
            return m1
        else:
            return m2

def maximum(l):
    if len(l) == 1:
        return l[0]
    else:
        m1 = maximum(l[:len(l) // 2])
        m2 = maximum(l[len(l) // 2:])
        if m1 > m2:
            return m1
        else:
            return m2


def sumup(n):
    a = n(n + 1) / 2
    return a

def sumup(n):
    a = n * (n + 1) / 2
    return a

Return the sum of all integers up to n.


def sumup(n):
    if int(n) == 0:
        return '0'
    else:
        return int(n(n + 1) / 2)

def sumup(n):
    if int(n) == 0:
        return 0
    else:
        return int(n * (n + 1) / 2)

# tags: invalid-return-type, missing-multiplication-symbol-from-formula

Return the sum of all integers up to n.


def sumup(n):
    if n == 0:
        return 0
    sum_to_n_minus_1 = sumup(n - 1)
    return n + sum_to_n_minus_1

Return the sum of all integers up to n.


def minimum(a):
    if len(a) == 1:
        return a[0]
    mini = minimun(a[:-1])
    if a[-1] < mini:
        return a[-1]
    else:
        return mini

def minimum(a):
    if len(a) == 1:
        return a[0]
    mini = minimum(a[:-1])
    if a[-1] < mini:
        return a[-1]
    else:
        return mini


def maximum(l):
    if len(l) == 1:
        return l[0]
    else:
        maxi = minimum(l[1:])
        return l[0] if l[0] > maxi else maxi

def maximum(l):
    if len(l) == 1:
        return l[0]
    else:
        maxi = maximum(l[1:])
        return l[0] if l[0] > maxi else maxi


def sumup(n):
    total = [int(i) for i in range(0, n)]
    return sum(total)

def sumup(n):
    total = [int(i) for i in range(0, n + 1)]
    return sum(total)

Return the sum of all integers up to n.


def search(ls, val):
    if ls == []:
        return
    elif ls[0] == val:
        return True
    else:
        return search(ls[1:], val)

def search(ls, val):
    if len(ls) == 0:
        return False
    elif ls[0] == val:
        return True
    else:
        return search(ls[1:], val)

# LH # tags: compare-string-to-empty-list, missing-return-value


def search(ls, letter):
    if ls == []:
        return False
    elif ls[0] == val:
        return True
    else:
        return search(ls[1:], val)

def search(ls, letter):
    if len(ls) == 0:
        return False
    elif ls[0] == letter:
        return True
    else:
        return search(ls[1:], letter)

# LH # tags:  wrong-variable-name, compare-string-to-empty-list


def search(str, letter):
    if str == []:
        return False
    elif str[0] == val:
        return True
    else:
        return search(str[1:], letter)

def search(str, letter):
    if len(str) == 0:
        return False
    elif str[0] == letter:
        return True
    else:
        return search(str[1:], letter)

# LH # tags: compare-string-to-empty-list, wrong-variable-name


def search(str, letter):
    if letter in str:
        print(True)
    else:
        print(False)

def search(str, letter):
    if letter in str:
        return True
    else:
        return False


def count_letters(s):
    global count
    count += 1
    if not s:
        return count
    s = s[:-1]
    return count_letters(s)

assert count_letters('')==0 and count_letters('0')==1 and count_letters('##')==2 and count_letters('t')==1 and count_letters('fqfseqfseqsse')==13

def count_letters(s, count=0):
    if not s:
        return count
    s = s[:-1]
    return 1 + count_letters(s)

Return the number of lettres in a string.


def count_letters(word):
    try:
        i = i + 1
        return count_letters(word[1:])
    except:
        return i

def count_letters(word):
    if len(word) == 0:
        return 0
    return 1 + count_letters(word[1:])


def count_letters(word):
    i = 0
    try:
        i = i + 1
        return count_letters(word[1:])
    except:
        return i

# KC# missing-based recursion case, wrong strategy


def count_letters(word):
    if word == '':
        return 0
    try:
        i = i + 1
        return count_letters(word[1:])
    except:
        return i

def count_letters(word):
    if word == '':
        return 0
    return 1 + count_letters(word[1:])


def count_letters(s):
    total = 0
    if not s:
        return total
    else:
        for c in s[:-1]:
            total += 1
    return count_letters(s) + 1

def count_letters(s):
    total = 0
    if not s:
        return total
    else:
        for c in s[:-1]:
            total += 1
    return total + 1

# KC# wrong strategy - mixing recursion with iteration


def count_letters(s):
    count = 0
    i = 0
    while s[i] != '':
        count += 1
        i += 1
        return count_letters(s)
    return count

def count_letters(s):
    count = 0
    i = 0
    while i < len(s):
        count += 1
        i += 1
    return count


def swap_keys_values(d):
    dictionary = {}
    for key in d:
        dictionary[d[key]] = key
        return dictionary

def swap_keys_values(s):
    dictionary = {}
    for i in s:
        dictionary[s[i]] = i
    return dictionary

Swap keys with values.


def swap_keys_values(d):
    new_d = {}
    key = sorted(d.keys())
    value = sorted(d.values())
    for i in range(0, len(key) - 1):
        new_d[key[i]] = value[i]
    return new_d

def swap_keys_values(d):
    new_d = {}
    key = list(d.keys())
    value = list(d.values())
    for i in range(0, len(key)):
        new_d[value[i]] = key[i]
    return new_d

Swap keys with values.


def swap_keys_values(d):
    new_d = {}
    for k, v in d:
        d1[v] = k
    return new_d

def swap_keys_values(d):
    new_d = {}
    for k, v in d.items():
        new_d[v] = k
    return new_d

Swap keys with values.


def swap_keys_values(d):
    new_dict = {}
    i = 0
    while i < len(d):
        new_dict[d[0]] = d[1]
        i += 1
    return new_dict

def swap_keys_values(d):
    new_dict = {}
    i = 0
    keys = list(d.keys())
    values = list(d.values())
    while i < len(d):
        new_dict[values[i]] = keys[i]
        i += 1
    return new_dict

Swap keys with values.


def swap_keys_values(x):
    d = {v: k for k, v in list(a.items())}
    return x

def swap_keys_values(x):
    d = {v: k for k, v in list(x.items())}
    return d

Swap keys with values.


def swap_keys_values(d):
    dic = {}
    for key in d:
        d[key] = value
        d[value] = d[key]
    return dic

def swap_keys_values(d):
    dic = {}
    for key, value in d.items():
        dic[value] = key
    return dic

Swap keys with values.


def swap_keys_values(s):
    dictionary = {}
    for i in s:
        dictionary[s[i]] = i
        return dictionary

Swap keys with values.


def search(ls, val, pos):
    if pos == len(ls):
        return False
    elif ls[pos] == val:
        return True
    else:
        return search(ls, val, pos + 1)

def search(ls, val, pos=0):
    if pos == len(ls):
        return False
    elif ls[pos] == val:
        return True
    else:
        return search(ls, val, pos + 1)


def count_letters(s):
    total = 0
    for c in (s - 1):
        total += 1
    return count_letters(s[:-1]) + 1

def count_letters(s):
    total = 0
    for c in s:
        total += 1
    return total


def count_letters(s):
    total = 0
    if s == '':
        return 0
    else:
        for c in s[:-1]:
            total += 1
            s = s[c:-1]
        return count_letters(s) + 1

def count_letters(s):
    total = 0
    if s == '':
        return 0
    else:
        for c in s[:-1]:
            total += 1
        return total + 1


def count_letters(s):
    total = 0
    if s == '':
        return total
    else:
        i = 0
        for c in s[:-1]:
            total += 1
            i += 1
            s = s[i:-1]
        return count_letters(s) + 1

def count_letters(s):
    total = 0
    if s == '':
        return total
    else:
        i = 0
        for c in s[:-1]:
            total += 1
        return total + 1


def count_letters(s):
    total = 0
    if s == '':
        return total
    else:
        i = 0
        for c in s:
            if c.isalpha():
                s[i] = 1
                t = s[:i]
                t += s[i]
                t += s[i:]
                s = t
        if not s.isupper():
            total = 0
            for c in s:
                total += c
            return total
        else:
            return count_letters(s)


def count_letters(s):
    total = 0
    if s == '':
        return total
    else:
        i = 0
        for c in s:
            if c.isalpha():
                s[i] = '1'
                t = s[:i]
                t += s[i]
                t += s[i:]
                s = t
        if not s.isupper():
            total = 0
            for c in s:
                total += int(c)
            return total
        else:
            return count_letters(s)


def count_letters(s):
    total = 0
    if s == '':
        return total
    else:
        i = 0
        for c in s:
            if c.isalpha():
                t = s[:i]
                t += '1'
                t += s[i:]
                s = t
            i += 1
        if not s.isupper():
            total = 0
            for c in s:
                total += int(c)
            return total
        else:
            return count_letters(s)


def count_letters(s):
    total = 0
    if s == '':
        return total
    else:
        i = 0
        for c in s.lower():
            if c.islower():
                t = s[:i]
                t += '1'
                t += s[i:]
                s = t
            i += 1
        if not s.islower():
            total = 0
            for c in s:
                total += 1
            return total
        else:
            return count_letters(s)


def count_letters(s):
    count = 0
    if s == '':
        return count
    elif s != '':
        s = list(s)
        s.pop()
        """""".join(s)
        print(count)
        count += 1
        return count_letters(s)


def count_letters(s=''):
    return count(s)


def search(string, letter):
    print(letter in string)


def count_letters(s):
    total = 0
    for c in s[:-1]:
        total += 1
    return count_letters(s[:-1]) + 1


def swap_keys_values(d):
    keys = []
    values = []
    dic = {}
    for v, k in list(d.items()):
        keys.append(k)
        values.append(v)
    i = 0
    while i < len(values):
        dic[values[i]] = keys[i]
        i = i + 1
    return d

def swap_keys_values(d):
    keys = []
    values = []
    dic = {}
    for k, v in list(d.items()):
        keys.append(k)
        values.append(v)
    i = 0
    while i < len(values):
        dic[values[i]] = keys[i]
        i = i + 1
    return dic

# KC# complex strategy# wrong variable usage

Swap keys with values.


def swap_keys_values(d):
    dic = {}
    a = list(d.values())
    b = list(d.keys())
    print(a)

Swap keys with values.


def swap_keys_values(d):
    keys = list(d.keys())
    values = list(d.values())
    new = {}
    i = 0
    while i < len(keys):
        new[value[i]] = keys[i]
        i = i + 1
    return new

def swap_keys_values(d):
    keys = list(d.keys())
    values = list(d.values())
    new = {}
    i = 0
    while i < len(keys):
        new[values[i]] = keys[i]
        i = i + 1
    return new

Swap keys with values.


def swap_keys_values(d):
    dic = {}
    a = list(d.values())
    b = list(d.keys())
    print((a, 'boop'))

Swap keys with values.


def swap_keys_values(d):
    new_dict = {}
    for k, v in (list(d.keys()), list(d.values())):
        new_dict[v] = k
    return new_dict

def swap_keys_values(d):
    new_dict = {}
    for k, v in zip(list(d.keys()), list(d.values())):
        new_dict[v] = k
    return new_dict

Swap keys with values.


def swap_keys_values(dictionary_descriptor):
    new_dictionary = {}
    for keys, values in dictionary_descriptor:
        new_dictionary[values] = keys

def swap_keys_values(dictionary_descriptor):
    new_dictionary = {}
    for keys, values in dictionary_descriptor.items():
        new_dictionary[values] = keys
    return new_dictionary

Swap keys with values.


def swap_keys_values(d):
    print(d)
    new_dict = {}
    i = 0
    while i < len(d):
        new_dict[d[i]] = d[0]
        i += 1
    return new_dict

def swap_keys_values(d):
    new_dict = {}
    keys = list(d.keys())
    values = list(d.values())
    i = 0
    while i < len(d):
        new_dict[values[i]] = keys[i]
        i += 1
    return new_dict

Swap keys with values.


def swap_keys_values(d):
    for k, v in list(d.items()):
        k, v = v, k
    return d

def swap_keys_values(d):
    new_d = {}
    for k, v in list(d.items()):
        new_d[v] = k
    return new_d

# KC# wrong strategy: trying to swap dic in place

Swap keys with values.


def swap_keys_values(d):
    d_2 = []
    for entry in list(d.items()):
        u = entry[::-1]
        for k, v in u.split(','):
            d_2[k] = v
    return d_2

def swap_keys_values(d):
    d_2 = {}
    for entry in list(d.items()):
        k, v = entry
        d_2[v] = k
    return d_2

Swap keys with values.


def swap_keys_values(d):
    a = []
    for entry in list(d.items()):
        u = entry[::-1]
        a.append(u)
    return a

Swap keys with values.


Swap keys with values.


def swap_keys_values(a):
    for entry in a:
        u = entry[::-1]
        a.append(u)
    return a

Swap keys with values.


def swap_keys_values(d):
    a = []
    for entry in d:
        u = entry[::-1]
        a.append(u)
    return a

Swap keys with values.


def swap_keys_values(d):
    for key in d:
        key = tmp
        key = d[key]
        d[key] = tmp
    return d

# KC# wrong-strategy: trying to swap in place

Swap keys with values.


def swap_keys_values(d):
    tmp = ''
    for key in d:
        key = tmp
        key = d[key]
        d[key] = tmp
    return d

Swap keys with values.


def swap_keys_values(d):
    tmp = ''
    for key in d:
        key = key.split()
        tmp = key[0]
        key[0] = key[1]
        key[1] = tmp
    return d

Swap keys with values.


def swap_keys_values(d):
    for key in d:
        key = key.split()
        tmp = key[0]
        key[0] = key[1]
        key[1] = tmp
    return tmp

Swap keys with values.


def swap_keys_values(d):
    for key in d:
        key = key.split()
    return key

Swap keys with values.


def swap_keys_values(d):
    new = {v: k for k, v in list(d.items())}
    return new

Swap keys with values.


def swap_keys_values(x):
    d = dict((k, v) for v, k in list(x.items()))
    return x

def swap_keys_values(x):
    d = dict((k, v) for v, k in list(x.items()))
    return d

Swap keys with values.


def swap_keys_values(d):
    d = {}
    for k, v in list(d.items()):
        d[v] = k
    return d

Swap keys with values.


def swap_keys_values(d):
    new_dict = {}
    for key, value in d:
        return d

def swap_keys_values(d):
    new_dict = {}
    for key, value in d.items():
        new_dict[value] = key
    return new_dict

Swap keys with values.


def swap_keys_values(d):
    new_dict = {}
    for key, value in list(d.items()):
        return d

def swap_keys_values(d):
    new_dict = {}
    for key, value in list(d.items()):
        new_dict[value] = key
    return new_dict

Swap keys with values.


def swap_keys_values(d):
    a2 = {}
    a3 = {}
    ar = sorted(list(d.items()), reverse=True)
    for k, v in ar:
        a2[v] = k
    ar2 = sorted(list(a2.items()), reverse=True)
    for k, v in ar2:
        a3[k] = v
    return a3

# KC# unkwown strategy# complex strategy

Swap keys with values.


def swap_keys_values():
    oldkeys = []
    oldvalues = []
    swappeddict = {}
    for key in dictionary:
        oldkeys.append(list(dictionary.keys()))
        oldvalues.append(list(dictionary.values()))
    for e in oldkeys:
        swappeddict[oldvlaues] = oldkeys
    return swappeddict

def swap_keys_values(dictionary):
    oldkeys = []
    oldvalues = []
    swappeddict = {}
    for key in dictionary:
        oldkeys.append(key)
        oldvalues.append(dictionary[key])
    for k, v in zip(oldkeys, oldvalues):
        swappeddict[v] = k
    return swappeddict

Swap keys with values.


def swap_keys_values(dictionary):
    oldkeys = []
    oldvalues = []
    swappeddict = {}
    for key in dictionary:
        oldkeys.append(list(dictionary.keys()))
        oldvalues.append(list(dictionary.values()))
    for e in oldkeys:
        swappeddict[oldvalues] = oldkeys
    return swappeddict

Swap keys with values.


def swap_keys_values(dictionary):
    oldkeys = []
    oldvalues = []
    swappeddict = {}
    for key in dictionary:
        oldkeys.append(list(dictionary.keys()))
        oldvalues.append(list(dictionary.values()))
    i = 0
    while i < len(oldkeys):
        swappeddict[oldvalues[i]] = oldkeys[i]
        i = i + 1
    return swappeddict

def swap_keys_values(dictionary):
    oldkeys = []
    oldvalues = []
    swappeddict = {}
    for key in dictionary:
        oldkeys.append(key)
        oldvalues.append(dictionary[key])
    i = 0
    while i < len(oldkeys):
        swappeddict[oldvalues[i]] = oldkeys[i]
        i = i + 1
    return swappeddict

Swap keys with values.


Swap keys with values.


def swap_keys_values(d):
    swap1 = {}
    swap2 = {}
    swapsorted = sorted(list(d.items()), reverse=True)
    for k, v in swapsorted:
        swap1[v] = k
    swapsorted2 = sorted(list(swap1.items()), reverse=True)
    for k, v in swapsorted2:
        swap2[k] = v
    return swap2

Swap keys with values.


def swap_keys_values():
    new_dic = {}
    for key in dic:
        if dic[key] not in new_dic:
            new_dic[dic[key]] = key
    return new_dic

def swap_keys_values(dic):
    new_dic = {}
    for key in dic:
        new_dic[dic[key]] = key
    return new_dic

Swap keys with values.


def minimum(l=[]):
    if len(l) == 0:
        return l
    lowest = 0
    i = 0
    while i < len(l):
        if i > lowest:
            lowest = i
    return lowest

def minimum(l=[]):
    lowest = l[0]
    i = 0
    while i < len(l):
        if l[i] < lowest:
            lowest = l[i]
        i += 1
    return lowest


def minimum(l):
    if len(l) == 1:
        return l[0]
    else:
        return min(l[0], findMinimum(l[1:]))

def minimum(l):
    if len(l) == 1:
        return l[0]
    else:
        return min(l[0], minimum(l[1:]))


def minimum(a):
    if len(a) == 1:
        return a[0]
    else:
        small = a[0]
        if a[1] < small:
            small = a[1]
        else:
            a.remove(a[0])
    return minimum(a)

def minimum(a):
    if len(a) == 1:
        return a[0]
    else:
        small = a[0]
        if a[1] < small:
            a.remove(a[0])
        else:
            a.remove(a[1])
    return minimum(a)


def minimum(a):
    if len(a) == 1:
        return a[0]
    if a[0] > minimum(a[1:]):
        return a[0]
    else:
        return minimum(a[1:])

def minimum(a):
    if len(a) == 1:
        return a[0]
    if a[0] < minimum(a[1:]):
        return a[0]
    else:
        return minimum(a[1:])


def minimum(l):
    if len(l) == 1:
        return l[0]
    return minimum(l[1:])

def minimum(l):
    if len(l) == 1:
        return l[0]
    min = minimum(l[1:])
    return l[0] if l[0] < min else min


def minimum(l=[]):
    if len(l) == 1:
        return l[0]
    if l[0] < minimum(l[0:]):
        return l[0]
    else:
        return minimum(l[:])

def minimum(l=[]):
    if len(l) == 1:
        return l[0]
    if l[0] < minimum(l[1:]):
        return l[0]
    else:
        return minimum(l[1:])


def minimum(list):
    if len(list) == 1:
        return list[0]
    list = sorted(list)
    return minimum(list.pop())

def minimum(list):
    if len(list) == 1:
        return list[0]
    list = sorted(list)
    return list[0]


def minimum(list):
    if len(list) == 1:
        return list[0]
    elif list[0] < minimum(list[1:]):
        return list[0]
    else:
        return minimum(list[1:])


def minimum(a):
    if len(a) == 1:
        return a[0]
    if a[0] < a[1]:
        a.append(a[0])
    return minmum(a[1:])


def minimum(l):
    if len(l) == 0:
        return 0
    lowest = 100
    for line in l:
        if line < lowest:
            lowest = line
    return minimum(lowest)

def minimum(l):
    lowest = l[0]
    for line in l:
        if line < lowest:
            lowest = line
    return lowest


def minimum(l):
    if len(l) == 1:
        return l[0]
    else:
        l = min(l[0], mininum(l[1:]))
        return l

def minimum(l):
    if len(l) == 1:
        return l[0]
    else:
        l = min(l[0], minimum(l[1:]))
        return l


def minimum(l):
    if len(l) == 1:
        return l[0]
    if l[0] > l[1]:
        l.remove(l[1])
    elif l[0] < l[1]:
        l.remove(l[0])
    return minimum(l)

def minimum(l):
    if len(l) == 1:
        return l[0]
    if l[0] > l[1]:
        l.remove(l[0])
    elif l[0] <= l[1]:
        l.remove(l[1])
    return minimum(l)


def minimum(l):
    l = sort(l)
    return l[0]

def minimum(l):
    l = sorted(l)
    return l[0]


def minimum(l):
    l = l.sort(key=None)
    return l

def minimum(l):
    l.sort(key=None)
    return l[0]


def minimum(l):
    l = l.sort(key=min())
    return l

def minimum(l):
    l.sort()
    return l[0]


def minimum(l):
    if len(l) == 1:
        return l[0]
    large = l[0]
    for num in l:
        if num > large:
            large = num
    return l.remove(large)

def minimum(l):
    if len(l) == 1:
        return l[0]
    large = l[0]
    for num in l:
        if num > large:
            large = num
    l.remove(large)
    return minimum(l)


def minimum(l):
    if len(l) == 1:
        return l[0]
    large = l[0]
    for num in l:
        if num > large:
            large = num
    return minimum(l.remove(large))


def minimum(l, n):
    if n == 0:
        return l[0]
    min = minimum(l[1:], n - 1)
    if l[0] < min:
        return l[0]
    else:
        return min


def minimum(A, p, r):
    q = j = p
    while j < r:
        if A[j] <= A[r]:
            A[q], A[j] = A[j], A[q]
            q += 1
        j += 1
    A[q], A[r] = A[r], A[q]
    return q


def minimum(a):
    if len(a) == 1:
        return a[0]
    small = a[0]
    if a[1] < small:
        small = a[1]
    else:
        a.remove(a[0])
    return minimum(a)

def minimum(a):
    if len(a) == 1:
        return a[0]
    small = a[0]
    if a[1] > small:
        a.remove(a[1])
    else:
        a.remove(a[0])
    return minimum(a)


def minimum(l=[]):
    if len(l) == 0:
        return l
    lowest = 0
    i = 0
    j = i + 1
    while i < len(l):
        if i < j[i]:
            j[i] = i
    return i


def minimum(n):
    if len(n) == 1:
        return n
    if n[0] > minimum(n[1:]):
        return n + 1
    else:
        return minimum(n - 1)

def minimum(n):
    if len(n) == 1:
        return n[0]
    if n[0] < minimum(n[1:]):
        return n[0]
    else:
        return minimum(n[1:])


def minimum(l):
    if len(l) == 1:
        return l[0]
    minimum = minimum(l[1])
    if l[0] < minimum:
        l.pop(minimum)
    else:
        l.pop(l[0])
    return l[0]

def minimum(l):
    if len(l) == 1:
        return l[0]
    mini = minimum(l[1:])
    if l[0] > mini:
        return mini
    return l[0]

# KC# mixing poping and recursive strategy


def minimum(l=[]):
    if len(l) == 1:
        return l[0]
    if l[0] < minimum(l[:]):
        return l[0]
    else:
        return minimum(l[:])


def minimum(list):
    if len(list) == 1:
        return list[0]
    max_value = max(list)
    return list.remove(max_value)

def minimum(list):
    if len(list) == 1:
        return list[0]
    max_value = max(list)
    list.remove(max_value)
    return minimum(list)


def minimum(l):
    lowest = 10000000000
    if l == []:
        return lowest
    if int(l[0]) < lowest:
        lowest = int(l[0])
    return minimum(l[0]).pop


def minimum(n):
    if len(n) == 1:
        return n[0]
    else:
        min_ret = minimum(n[1:])
        return n[0] if n[0] > min_ret else min_ret

def minimum(n):
    if len(n) == 1:
        return n[0]
    else:
        min_ret = minimum(n[1:])
        return n[0] if n[0] < min_ret else min_ret


def minimum(l):
    mini = 0
    while i < len(l):
        if l[i] < mini:
            mini = l[i]
        i += 1
    return mini

def minimum(l):
    mini = l[0]
    i = 0
    while i < len(l):
        if l[i] < mini:
            mini = l[i]
        i += 1
    return mini


def minimum(l):
    mini = 0
    i = 0
    while i < len(l):
        if l[i] < mini:
            mini = l[i]
        i += 1
    return mini


def minimum(l):
    mini = 0
    i = 0
    while i < len(l):
        if int(l[i]) < mini:
            mini = int(l[i])
        i = i + 1
    return mini

def minimum(l):
    mini = l[0]
    i = 0
    while i < len(l):
        if int(l[i]) < mini:
            mini = int(l[i])
        i = i + 1
    return mini


def minimum(l):
    mini = 0
    i = 0
    while i < len(l):
        if int(l[i]) <= mini:
            mini = int(l[i])
        i = i + 1
    return mini

def minimum(l):
    mini = l[0]
    i = 0
    while i < len(l):
        if int(l[i]) <= mini:
            mini = int(l[i])
        i = i + 1
    return mini


def minimum(l):
    mini = 0
    i = 0
    while i < len(l):
        if int(l[i]) <= mini:
            mini = int(l[i])
        i = i + 1
    return l[i]


def minimum(l):
    mini = 0
    i = 0
    while i < len(l) - 1:
        if int(l[i]) <= mini:
            mini = int(l[i])
        i = i + 1
    return mini

def minimum(l):
    mini = l[0]
    i = 0
    while i <= len(l) - 1:
        if int(l[i]) <= mini:
            mini = int(l[i])
        i = i + 1
    return mini


def minimum(l):
    mini = 0
    i = 0
    while i < len(l) - 1:
        if mini > l[i]:
            mini = int(l[i])
        i = i + 1
    return mini

def minimum(l):
    mini = l[0]
    i = 0
    while i <= len(l) - 1:
        if mini > l[i]:
            mini = int(l[i])
        i = i + 1
    return mini


def minimum(a):
    if len(a) == 1:
        return a[0]
    else:
        small = a[0]
        if a[1] < small:
            small = a[i]
            a.remove(a[0])
        else:
            a.remove(a[1])
    return minimum(a)

def minimum(a):
    if len(a) == 1:
        return a[0]
    else:
        small = a[0]
        if a[1] < small:
            a.remove(a[0])
        else:
            a.remove(a[1])
    return minimum(a)


def minimum(a):
    if len(a) == 1:
        return a[0]
    return minimum(a.remove(max(a)))

def minimum(a):
    if len(a) == 1:
        return a[0]
    a.remove(max(a))
    return minimum(a)


def minimum(l):
    l = l.sort()
    return l[0]


def minimum(l):
    sorted(l)
    return l


def minimum(l):
    if len(l) == 1:
        return l[0]
    i = 0
    if l[i] > l[i + 1]:
        i = i + 1
        l = l[i]
    else:
        l.pop(i + 1)
    return minimum(l)


def minimum(l, min):
    if not l:
        return []
    return minimum(l[1:], l[0] if l[0] < val else val)


def minimum(l):
    if not l:
        return []
    return minimum(min(l))

def minimum(l):
    if not l:
        return []
    return min(l)


def minimum(l, n=0):
    min = minimum(l[1:], n - 1)
    if l[0] < min:
        return l[0]
    else:
        return min

def minimum(l):
    if len(l) == 1:
        return l[0]
    min = minimum(l[1:])
    if l[0] < min:
        return l[0]
    else:
        return min


def maximum(n):
    if len(n) == 1:
        return n[0]
    else:
        min_ret = minimum(n[1:])
        return n[0] if n[0] > min_ret else min_ret

def maximum(l):
    if len(l) == 1:
        return l[0]
    else:
        maxi = maximum(l[1:])
        return l[0] if l[0] > maxi else maxi


def reverse(a):
    rev = []
    i = 0
    while i < len(a):
        rev.append(a[len(a) - i])
        i = i + 1
    print(rev)

def reverse(a):
    rev = []
    i = 0
    while i < len(a):
        rev.append(a[len(a) - i - 1])
        i = i + 1
    return rev

# tags: index-overbound-in-iteration, printing-instead-of-returning

Reverse a list of elements.


def reverse(a):
    rev = []
    i = 0
    while i < len(a):
        rev.append(a[len(a) - i])
        i = i + 1
    print(rev.rstrip())

# tags: printing-instead-of-returning, missing-return, index-overbound-in-iteration

Reverse a list of elements.


def reverse(a):
    rev = []
    i = 0
    while i < len(a):
        rev.append(a[len(a) - i])
        i = i + 1
    print(rev.strip())

Reverse a list of elements.


Reverse a list of elements.


def reverse(a):
    rev = []
    i = 0
    while i < len(a):
        rev.append(a[len(a) - i])
        i = i + 1
    return rev

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        print(a[len(a) - i - 1])
        i = i + 1

Reverse a list of elements.


def reverse(a):
    rev = []
    for i in len(a):
        rev.append(a[len(a) - i - 1])
    return rev

def reverse(a):
    rev = []
    for i in range(len(a)):
        rev.append(a[len(a) - i - 1])
    return rev

Reverse a list of elements.


def reverse(a):
    rev = []
    i = 0
    for i in len(a):
        rev.append(a[len(a) - i - 1])
    return rev

def reverse(a):
    rev = []
    i = 0
    for i in range(len(a)):
        rev.append(a[len(a) - i - 1])
    return rev

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1]
        i = i + 1
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i = i + 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    t = a[i]
    a[i] = a[j]
    a[j] = t

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i = i + 1
    return a

Reverse a list of elements.


def reverse(a):
    j = 0
    i = len(a) - 1
    while j < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        j = j + 1
        i = i + 1
    return a

def reverse(a):
    j = 0
    i = len(a) - 1
    while j < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        j = j + 1
        i = i - 1
    return a

Reverse a list of elements.