Commit 80ea3c99 by BellCodeEditor

save project

parent 2681b9db
Showing with 6 additions and 4 deletions
import random
num=20
alist = [1,3,5,8,11,15,17,18,20,21]
alist = []
for i in range(1, 101):
alist.append(i)
num = random.choice(alist)
......@@ -18,4 +18,6 @@ def binary_search(alist,num):
low=mid+1
else:
high=mid-1
return None
\ No newline at end of file
return None
result=binary_search(alist,20)
print(result)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment