1 m=1 2 while m<3: 3 for i in range(3):#循环三次 4 x = input('x') 5 if int(x)==123: 6 print('welcome'.upper()) 7 exit() 8 else: 9 print('try again'.title()) 10 m+=1 11 c=input('keep?') 12 if c=='yes': 13 m=1 14 else: 15 break