引入了time.sleep,强制延时1s
#!/usr/bin/env python3import randomimport timestart = 0end = 99boom = random.randint(0, 99)while 1==1:people = int(input("填入{}到{}之间的数".format(start, end)))if people > boom :print("大了")end = peopleelif people < boom :print("小了")start = peopleelse:print("BOOM!")breakprint("等待电脑输入{}到{}之间的数".format(start, end))time.sleep(1)com = random.randint(start, end)print("电脑输入为{}".format(com))if com > boom :print("大了")end = comelif com < boom :print("小了")start = comelse:print("BOOM!")break