CBSE Class 11 Computer Science
Question 110 of 173
Data Handling — Question 39
Back to all questions 39
Question Question 39
Differentiate between a syntax error and a logical error in a python program. When is each type of error likely to be found?
Answer
| Syntax Error | Logical Error |
|---|---|
| Syntax Errors occur when we violate the rules of writing the statements of the programming language. | Logical Errors occur due to our mistakes in programming logic. |
| Program fails to compile and execute. | Program compiles and executes but doesn't give the desired output. |
| Syntax Errors are caught by the compiler. | Logical errors need to be found and corrected by people working on the program. |
Syntax errors are found at compile type whereas Logical errors are found when the program starts executing.