# Author:liuzhongchang LIU_age = 27 count=0 while count<3: guess_age = int(input("guess age:")) if guess_age==LIU_age: print("yes,you got it.") break elif guess_age>LIU_age: print("think smaller...") else: print("think bigger...") count+=1 else: print("you have tried too many times..fuck off..")
原文:http://www.cnblogs.com/liuzhongchang/p/7826327.html