age = 22
count = 1
guess = int(input('请猜猜我今年多少岁?你有三次机会:'))
while count < 3:
if guess < age:
guess = int(input(f'抱歉,你猜小了,你还有{3-count}次机会。请继续:'))
elif guess > age:
guess = int(input(f'抱歉,你猜大了,你还有{3-count}次机会。请继续:'))
else:
print('恭喜,你猜对了。',count)
break
count += 1
if guess != age:
print('抱歉,你的三次机会用完了!',count-3) 大佬们,这段里面,第一次,第二次猜对都有恭喜,但是第三次猜对什么也不显示,为什么,该怎么该 |