while if 循环判断
1 temp=input("猜一下我想的那个数字吧:") 2 guess=int(temp) 3 while guess!=8: 4 temp=input("诶呀错误了在输入一次吧:") 5 guess=int(temp) 6 if guess==8: 7 print("猜对了不过没有奖励哦") 8 else: 9 if guess<8: 10 print("诶呀小了") 11 else: 12 print("诶呀大了") 13 print("游戏结束不玩啦") 14