代码如下: from random import randint
num=randint(1,100)
print('which number you think is your best number?')
zhong=False while zhong==False:
answer=int(input()) if answer>num:
print('to big!') if answer<num:
print('too small!') if answer==num:
print('it’s your best number!')
zhong==True这个报错为啥呢
随机数函数不生效