练习发帖
import randomanswer = random.randint(1,10)
counts = 3
while counts > 0 :
temp = input("请输入小甲鱼心里想的数字:")
guess = int(temp)
if guess == answer :
print("答对了,真牛逼!")
break
else :
if guess > answer :
print("数字大了!")
else :
print("数字小了!")
counts = counts - 1
print("游戏结束,古德拜!")
页:
[1]