猜年龄,三次失败退程序

my_age = 30

count = 0
while count < 3:
    user_input = int(input("input your guess number:"))
    if user_input == my_age:
        print("good job,you got it!")
        break
    elif user_input > my_age:
        print("no no no try samller")
    else:
        print("no no no try bigger")
    count += 1
else:
    print("对你无语,拜拜!")

  

posted @ 2017-03-30 23:18  im777  阅读(164)  评论(0编辑  收藏  举报