Programmers Arena: ERRORS

ERRORS

While using the GUI / interactive mode the errors can be spotted easily as the interactive mode won't allow your false codes to become a function. Whereas if you use the IDLE mode you may encounter problems or errors that you won't be able to spot easily, therefore to debug your program you must first know the type of error or mistake you made. There are three types of errors, namely,
1.) Syntax Error
2.) Run Time Error
3.) Logical Error



SYNTAX ERROR:
These are the errors which are encountered while compiling a program, such as if you don't put a semi colon after an if-else statements it would give you an error in the interactive mode whereas the program won't run if it had been directly programmed.

RUN TIME ERROR:
These errors are encountered during the execution of a syntactically valid programming statement, such as when you divide any number with zero, it would give you an error, if programmed directly, the python file would not run.

LOGICAL ERROR:
You will encounter such errors when a programmer ( i.e. you) makes a mistake, to explain, if you want to calculate  the area of a circle and unknowingly you enter the formula for the perimeter of the circle, it would give you the incorrect value for area whereas the correct value of the perimeter. Such errors are difficult to be found if considered generally.


No comments:

Post a Comment

Copyright © Programmers Arena