实现猜数游戏(python) from random import randint def guessNumber(maxValue = 10 , maxTimes = 3): #随机生成一个整数 value = randint(1,maxValue) for i in range(maxTimes): prompt = 'Start to GUESS:' if i==0 else 'Guess again:' #使用异常处理结构,防止输入不是数字的情况 try: x = int(input(pro