7dff214d9ba2bd178830d06422073022def49ba3,BinarySeach.py,,,#,25

Before Change


            continue
            // print("Not found")
    return found
print("Enter numbers seprated by space")
s = input()
numbers = list(map(int, s.split()))
trgt =int( input("enter a single number to be found in the list "))
binarySearch(numbers, trgt)

After Change


    return None


if __name__ == "__main__":
    import sys
    // For python 2.x and 3.x compatibility: 3.x has not raw_input builtin
    // otherwise 2.x"s input builtin function is too "smart"
    if sys.version_info.major < 3:
        input_function = raw_input
    else:
        input_function = input

    user_input = input_function("Enter numbers separated by coma:\n")
    collection = [int(item) for item in user_input.split(",")]

    target_input = input_function(
        "Enter a single number to be found in the list:\n"
    )
    target = int(target_input)
    result = binary_search(collection, target)
    if result is not None:
        print("{} found at positions: {}".format(target, result))
    else:
        print("Not found")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

Instances


Project Name: TheAlgorithms/Python
Commit Name: 7dff214d9ba2bd178830d06422073022def49ba3
Time: 2016-07-29
Author: me@sergeytsaplin.com
File Name: BinarySeach.py
Class Name:
Method Name:


Project Name: ncoudray/DeepPATH
Commit Name: 64c0ea557df21a7585f6fd0fef9d1b0c20f2da3d
Time: 2019-11-19
Author: coudrn01@bigpurple-ln2.cm.cluster
File Name: DeepPATH_code/00_preprocessing/0b_tileLoop_deepzoom4.py
Class Name:
Method Name:


Project Name: TheAlgorithms/Python
Commit Name: f9f5d402d390329b5b88b33c9ce4d625a87917cd
Time: 2018-10-16
Author: darjiharshil2994@gmail.com
File Name: sorts/bubble_sort.py
Class Name:
Method Name: