测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A31985. 执行下面Python代码,输入0和字符串“abc”后,输出的结果是?( )try: a = int(input()) b = int(input()) x = a / b print(x, end="#")except ZeroDivisionError: print(0, end="#")except: print(1, end="#") else: print(2, end="#") fin…

单选题 较难

题目描述

执行下面Python代码,输入0和字符串“abc”后,输出的结果是?(    )

try:

a = int(input())

b = int(input()) 

x = a / b print(x, end="#")

except ZeroDivisionError: 

print(0, end="#")

except:

print(1, end="#") 

else:

print(2, end="#") 

finally:

print(3, end="#")

选项(单选)

上一题 下一题