Commit 80ea3c99 by BellCodeEditor

save project

parent 2681b9db
Showing with 5 additions and 2 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)
......@@ -19,3 +19,5 @@ def binary_search(alist,num):
else:
high=mid-1
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