第一次用python编写的小程序

print ("*******数字游戏*********")

temp = input ("猜猜小红现在心里想的是什么数字呢?")

guess = int(temp)

while guess !=8:

temp = input ("猜错啦,请重新输入")

guess = int(temp)

if guess == 8:

print("猜对啦,你是我心里的小蛔虫吗")

else:

if guess > 8:

print("哎呀,太大啦")

else:

print ("啊啊,太小了")

print ("游戏结束,不玩啦")

链接 http://www.rkpass.cn/u.jsp?u=316407