Error types in python:Syntax error , Logical error , Exception error
As we know that there are a lot of error types that might happen during the programming process,one kind of it is called a Syntax Error which occured when you violate the rules of writing the code or in another mean as it's name reffere when there is an error in the syntax of the language , this error in fact is easy to detected by the compiler ,the compiler will show you what is the error and also the number of line the error in.
Example:writing incorrect function name,does not importing a module ,usually in languages like java and c++ it is occured because of forgoting the semicolon ( ; )
another type of errors is called Logical Error this error usually occur but you do not feel about it ,the program will run without any problem but the problem is with the meaning of the program it self you may want your code to add two numbers and write it ' -' in your formula
sum=number1 - number2 ,here there is no violation of the syntax of the language ,every thing is Allright but the code does not do its job.
The third type of errors is called Runtime Error and as it;s name reffere it is occured at the run time of the code .
Let's take an example :
Let's take an example :
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment