一个小游戏 随机函数random 循环while import random #练习随机函数用法 '''第一个游戏''' counts = 3 #循环3次退出 answer = random.randint(1,10) #随机在1到10中取一个数字 while counts > 0: temp =