"""author = 曹琦"""
作業(yè):輸入年齡并且將年齡值轉(zhuǎn)換成整數(shù),如果輸入錯誤程序不崩潰,讓其重新輸入,知道輸入無誤為止....
while True:
try:
age = int(input('請輸入年齡:'))
except:
print('請重新輸入:')
continue
break
print('=========')
"""author = 曹琦"""
while True:
try:
age = int(input('請輸入年齡:'))
except:
print('請重新輸入:')
continue
break
print('=========')