learning objective this unit introduces you to the different kinds of errors that can occur in program and how to distinguish among them in order to track them down quicker the three types of errors that will be discussed in this unit aresyntax errorsruntime errors and semantic errors the latter part of this unit will discuss the definition of exception and the importance of handling it using appropriate techniques the objective of this unit is toidentify the possibilities where programs can lead to unexpected outcomes describe the techniques used to distinguish among the type of errors describe the errors and exceptions handling mechanisms in python write robust code using appropriate error handling techniques introduction programmers must be always mindful of possible errors that may arise in their programs examples abounda function may not receive arguments that it is designed to accepta necessary resource may be missingor connection across network may be lost when designing programone must anticipate the exceptional circumstances that may arise and take appropriate measures to handle them there is no single correct approach to handling errors in program python interpreter handles errors by terminating immediately and printing an error messageso that programmers can address issues as soon as they arise in any caseprogrammers must make conscious choices about how their programs should react to exceptional conditions different kinds of errors occur in program and it is important to distinguish among them in order to track them down more quickly the following are the three types of error that occurs in python programs syntax error runtime error semantic error syntax error syntax errors are produced by python when it is translating the source code into byte code they usually indicate that there is something wrong with the syntax of the program exampleomitting the colon at the end of def statement yields the somewhat redundant message syntaxerrorinvalid syntax syntax errors are usually easy to fix once you figure out what they are unfortunatelythe error messages are often page