Ad Code

C h a p ter Exception Handling 1 in Python - NCERT

 

Chapter Exception Handling 1 in Python - NCERT


1.1 Introduction

    Sometimes while executing a Python program, the program does not execute at all or the program executes but generates unexpected output or behaves abnormally. These occur when there are syntax errors, runtime errors or logical errors in the code. In Python, exceptions are errors that get triggered automatically. However, exceptions can be forcefully triggered and handled through program code. In this chapter, we will learn about exception handling in Python programs.


    1.2 Syntax Errors

 Syntax errors are detected when we have not followed the rules of the particular programming language while writing a program. These errors are also known as parsing errors. On encountering a syntax error, the interpreter does not execute the program unless we rectify the errors, save and 




















Post a Comment

0 Comments

Ad Code