import random
numMin = 1
numMax = 100
m = random.randint(numMin, numMax)
while True:
n = eval(input('请输入你猜测的整数:'))
if n > m:
print("区间为{}到{}".format(numMin,n))
numMax = m
elif n < m:
print("区间为{}到{}".format(n,numMax))
numMin = n
if n == m:
print("恭喜你,猜对了!!")
break