



try:
num1 = int(input("输出除数"))
num2 = int(input("输入被除数"))
print(num1/num2)
except ZeroDivisionError:
print("被除数不能为0")
else:
# 无论如何都会被执行
finally:
x = 10
if x > 5:
raise Exception("异常!")
class myException(Exception):
def __int__(self,value1,value2):
self.value1 = value1
self.value2 = value2
raise myException("hello","hi")