Commit 2138525b by BellCodeEditor

save project

parent 156d4d5b
Showing with 2398 additions and 12 deletions
with open(r'C:\Users\user\Desktop.txt.'r'encoding='utf-8') bingo_num = 17
as file: num_list = [1,3,5,8,11,15,17,18,20,21]
a=file.readlines
for i in a: def binar
data=split() low = 0
print(data[1:]) high = len(num_list)-1
\ No newline at end of file while low <= high:
mid = (low + high) // 2
guess = num_list[mid]
if guess == bingo_num:
print("找到了,它的索引是:",mid)
break
elif guess < bingo_num:
low = mid + 1
else:
high = mid - 1
def b
\ No newline at end of file
for info in alist: bingo_num = 17
for info in alist: bingo_num = 17
self.camvas.create_text(40,self.y,text=info,fon)=("宋体") num_list = [1,3,5,8,11,15,17,18,20,21]
low = 0
high = len(num_list)-1
while low <= high:
mid = (low + high) // 2
guess = num_list[mid]
if guess == bingo_num:
print("找到了,它的索引是:",mid)
break
elif guess < bingo_num:
low = mid + 1
else:
high = mid - 1
......
...@@ -8,4 +8,2367 @@ canv.piace(x=30,y=60) ...@@ -8,4 +8,2367 @@ canv.piace(x=30,y=60)
canv.piace(x=0,y=0) canv.piace(x=0,y=0)
root.manloo() root.manloo()
\ 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