count = 0
while True:
#print('count:',count)
if count == 3:
print('you guess over 3 times!fuck off!')
break
age = int(input('Please guess the lmc age:'))
if age == 18:
print('yes,you got it!')
break
elif age < 18:
print('think bigger…')
else:
print('think smaller…')
count=count+1
count = 0
while count < 3:
#print('count:',count)
age = int(input('Please guess the lmc age:'))
if age == 18:
print('yes,you got it!')
break
elif age < 18:
print('think bigger…')
else:
print('think smaller…')
count=count+1
else:#当while后条件不成立时执行
print('you guess over 3 times!fuck off!')
<wiz_tmp_tag id="wiz-table-range-border" contenteditable="false" style="display: none;">