Test Index

CBSE Class 12 Computer Science 2026 Paper Set 4 Get it on Google PlayDownload on the App Store

© examsnet.com
Question : 11 of 37
Marks: +1, -0
State whether the following statement is True or False :
In Python, Logical errors can be handled using try......except......finally statement.
Solution:  
Concept:
try...except...finally handles exceptions, i.e. run-time errors that Python detects and raises (ZeroDivisionError, ValueError, IndexError, ...).
Explanation:
A logical error is a mistake in the program's logic (e.g. writing avg = a + b / 2 instead of avg = (a + b) / 2). The program runs without any error message and just gives a wrong result, so no exception is raised and there is nothing for except to catch. Logical errors are found by testing and debugging, not by exception handling.
Hence the statement is False.
Answer:
Option B (False)
© examsnet.com
Advertisements
Go to Question: