Python学习_03 (while循环+随机数生成) import random th=0 text=7 #猜7次 te_xt=text-1 answer=random.randint(0,100) #随机生成0-100的数 print('猜数游戏,0~100范围'