import turtle as t import random jieguo = random.randint(0,100) cishu = int(input('请问你要几次机会:')) for i in range(cishu): hh = int(input('请再输入一个数')) cishu -= 1 if hh > jieguo: print('太大了') if hh < jieguo: print('太小了') if hh == jieguo: print('恭喜你猜对了') break if cishu == 0: print('太可惜了没猜对')