def binary_search(sorted_list, lower, upper, element):
    """Return the position of the element in the sublist of sorted_list
    starting at position lower up to (but excluding) position upper 
    if it appears there. Otherwise return -1.
    """
    if upper <= lower:
        return -1
    mid = (upper + lower)//2
    if sorted_list[mid] == element:
        return mid
    if sorted_list[mid] < element:
        return binary_search(sorted_list, mid+1 , upper, element)
    if sorted_list[mid] > element:
        return binary_search(sorted_list, lower, mid, element)