Question: 
Write a function to search an element in the given array by using binary search.


Model's Code:
def binary_search(arr, target):
    left, right = 0, len(arr) - 1
    while left <= right:
        mid = (left + right) // 2
        if arr[mid] == target:
            return True
        elif arr[mid] < target:
            left = mid + 1
        else:
            right = mid - 1
    return False



Sample Correct Code:
def binary_search(item_list,item):
	first = 0
	last = len(item_list)-1
	found = False
	while( first<=last and not found):
		mid = (first + last)//2
		if item_list[mid] == item :
			found = True
		else:
			if item < item_list[mid]:
				last = mid - 1
			else:
				first = mid + 1	
	return found


Asserts:
assert binary_search([1,2,3,5,8], 6) == False
assert binary_search([7, 8, 9, 10, 13], 10) == True
assert binary_search([11, 13, 14, 19, 22, 36], 23) == False


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 492 of 974: 362/492 (73.57723577235772%): success