KnowledgeBoat Logo

Computer Science

Assertion (A): Exception handling handles all types of errors and exceptions.

Reasoning (R): Exception handling is responsible for handling anomalous situations during the execution of a program.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.

Python Exception Handling

3 Likes

Answer

Both A and R are true and R is the correct explanation of A.

Explanation
Exception handling in Python allows users to catch and manage various types of errors and exceptions that may occur during program execution. It is designed to handle unexpected or anomalous situations, such as errors or exceptions, that may arise while a program is running.

Answered By

2 Likes


Related Questions