def binarySearch(aList, num):
    left = 0
    right = len(aList) - 1
    found = False

    while left <= right and not found:
        middle = (left + right) // 2
        if aList[middle] == num:
            found = True
        else:
            if num < aList[middle]:
                right = middle - 1
            else:
                left = middle + 1

    return found

testList = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
number = int(input("please input a number: "))
print(binarySearch(testList, number))