try: x=int(input()) y=int(input()) n=x%y print(n) except ValueError: print('ValueError!') except ZeroDivisionError: print('ZeroDivisionError!') except: print('Other error!')
当程序输入:
0
程序的运行结果是:
Other error!