value = input('请输入一个整数')b_except = Truetry: value = int(value)except: value = 0else: b_except = False print('没有发生异常')if value == 0: if not b_except: print(0) else: print('输入有异常')else: print(value)