Commit 847d77f2 by BellCodeEditor

save project

parent 5b9a8767
Showing with 24 additions and 0 deletions
import random
guess=random.randint(1,100)
min=1
max=100
sb=10
while True:
if sb > 0:
a=input("请输入"+str(min)+"到"+str(max)+"的数字--\n")
a=int(a)
sb-=1
if a==guess:
print("√")
break
else:
if a>guess:
max=a
if a<guess:
min=a
print("You only "+str(sb)+" shot")
else:
print("END")
exit()
\ 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