try: x = 9 y = int(input()) n = x % y print('余数是', n) except: print('错误') else: print('正确') finally: print('程序结束')
余数是0 正确 程序结束
错误
错误 程序结束
程序结束