# Lesson26
age = 18
count = 0
while True:
while count <= 2:
guess = int(input('guess my age:'))
if guess == age:
print('Bingo!')
break
elif guess <= age:
print('Try bigger.')
else:
print('Try smaller.')
count += 1
count = 0
play_again = input('play again? y or n')
if play_again == 'n':
break
python全栈笔记-day02-guessAge
最新推荐文章于 2022-07-11 15:39:31 发布