标题: random 报错! [打印本页] 作者: KrisZ 时间: 2019-9-6 09:41 标题: random 报错! 代码如下: 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这个报错为啥呢
随机数函数不生效