所有的字符都自带布尔值,只有0,None,空为False,其他全部为真!!!!!!!!!!!
count = 0
while count < 3 :
inp_age =input('Enter your age: ')
inp_age = int(inp_age)
if inp_age == 18:
print('bingo!')
break
else:
print('age error')
count += 1
if count == 3:
inp_game = input('carry on or rall out..Y/N: ')
if inp_game == 'Y' or inp_game == 'y':###切记此处不可写为 inp_game == 'Y' or 'y',此时条件永远为真!!!
print('go on!')
count = 0
else:
break