Consider the basic form of the following instruction: try: … except: … Select correct statement. (select one)

Questions & AnswersCategory: PythonConsider the basic form of the following instruction: try: … except: … Select correct statement. (select one)
Lokesh Kumar Staff asked 2 years ago

Consider the basic form of the following instruction:

try:

    ...

except:

    ...

Select correct statement. (select one)
a. Python tries to execute the code that follows the try statement as normal part of the program. If an exception is not raised in the try block, the code following the except statement is executed.
b. Python tries to execute the code that follows the try statement as normal part of the program. When an exception is raised in a try block, the code following the except statement is not executed.
c. Python tries to execute the code that follows the try statement as normal part of the program. When an exception is raised in the try block, the code following the except statement is executed.

1 Answers
Lokesh Kumar Staff answered 2 years ago

c. Python tries to execute the code that follows the try statement as normal part of the program. When an exception is raised in the try block, the code following the except statement is executed.