guess game

myNum = 9
print('猜数字游戏\n')

while True:
    guess = int(input('请输一个数字:'))
    if guess > myNum:
        print('猜大了')
    elif guess < myNum:
         print('猜小了')
    else:
        print('恭喜你,猜对了!')
        break

  

posted @ 2018-04-28 16:08  世界第一稳  阅读(267)  评论(0编辑  收藏  举报