题目
题目

IS 4485-001 Fall 2025 Final Exam

单项选择题

What does the else block in exception handling do?

选项
A.Runs if an exception was raised
B.Runs if no exception was raised
C.Runs only if finally fails
D.Handles syntax errors
E.Logs all exceptions
F.Runs after finally
查看解析

查看解析

标准答案
Please login to view
思路分析
To tackle the question, first recall how try/except/else/finally blocks behave in exception handling. The else block is designed to run only when the code in the try block completes without raising an exception. It is skipped if any exception is raised in the try block, in which case control moves to the except b......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!