import random
secret = random.randint(1,10)
print("--------------猜字小游戏--------------")
temp=input("猜一下我心里想的是哪个数字:")
guess=int(temp)
while guess != secret:
if guess > secret:
print("哥,大了,大了!")
if guess < secret:
print("哥,小了,小了!")
temp=input("哎呀,猜错了,重新输入吧:")
guess=int(temp)
print("恭喜你,猜对了!")
print("游戏结束啦!")