1.这种含数字(int、float)类型的输入,怎么使用break来主动终止循环的运行,我使用的这个输入done是没有用的
count=0
total=0
shu=0
while True:
try:
shu=float(input('shu'))
except:
print('error')
if shu=='done':
break
for i in [shu]:
count+=1
total+=i
print(count,total,total/count)
2.try 和 except中间应放可能出错的代码吗