python_10_for guess

age_of_oldboy=56
count=0
for count in range(3):
    guess_age=int(input('guess age:'))
    if guess_age==age_of_oldboy:
        print('yes,you got it.')
        break#结束整个循环
    elif guess_age>age_of_oldboy:
        print('think smaller...')
    else:
        print("think bigger!")
else:
    print('you have tried too many times,fuck off')

  

posted @ 2018-01-03 09:21  耐烦不急  阅读(250)  评论(0编辑  收藏  举报