CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
4
You visited us 4 times! Enjoying our articles? Unlock Full Access!
Question

“Every syntax error is an exception but every exception cannot be a syntax error.” Justify the statement.

Open in App
Solution

Syntax error is an exception because python interpreter is unable to understand the statement you have written. Usually occurs when you have not followed the correct syntax of writing a statement. Even if a statement or expression is syntactically correct, there might arise an error during its execution. For example, trying to open a file that does not exist, division by zero and so on. Such types of errors might disrupt the normal execution of the program and are called exceptions.

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Database Structuring
ACCOUNTANCY
Watch in App
Join BYJU'S Learning Program
CrossIcon