单选题:下面程序的输出是什么?
下面程序的输出是什么?
try:
x=float("abc123")
print("The conversion is completed")
except IOError:
print("This code caused an IOError")
except ValueError:
print("This code caused an ValueError")
except:
print("An error happened")
A.The conversion is completed
B.This code caused an IOError
C.An error happened
D.This code caused an ValueError
答案:D
try:
x=float("abc123")
print("The conversion is completed")
except IOError:
print("This code caused an IOError")
except ValueError:
print("This code caused an ValueError")
except:
print("An error happened")
A.The conversion is completed
B.This code caused an IOError
C.An error happened
D.This code caused an ValueError
答案:D