Python-异常

try:
x = int(input('Enter the first number: '))
y = int(input('Enter the second number: '))
print(x/y)
except ZeroDivisionError:
print("输入的数字不能为0")
posted @ 2023-02-08 15:12  昵称不重要!  阅读(18)  评论(0)    收藏  举报