Advertisements
Advertisements
Question
State whether the following statement is True or False:
In Python, Logical errors can be handled using try...except...finally statement.
True or False
Advertisements
Solution
This statement is false.
Explanation:
- Runtime Errors: The
try..except..finallyA block is used to handle Runtime Errors (also known as exceptions), which occur during program execution (e.g., division by zero). - Logical Errors: These are flaws in the programmer's logic in which the code runs without crashing but produces incorrect output. Since no exception is raised, the
exceptA block cannot catch or handle them.
shaalaa.com
Is there an error in this question or solution?
