syntax errors like other programming languagespython has its own rules that determine its syntax the interpreter interprets the statements only if it is syntactically (as per the rules of pythoncorrect if any syntax error is presentthe interpreter shows error message(sand stops the execution there for exampleparentheses must be in pairsso the expression ( is syntactically correctwhereas ( is not due to absence of right parenthesis such errors need to be removed before the execution of the program logical errors logical error is bug in the program that causes it to behave incorrectly logical error produces an undesired output but without abrupt termination of the execution of the program since the program interprets successfully even when logical errors are present in itit is sometimes difficult to identify these errors the only evidence to the existence of logical errors is the wrong output while working backwards from the output of the programone can identify what went wrong for exampleif we wish to find the average of two numbers and and we write the code as / it would run successfully and produce the result surely is not the average of and the correct code to find the average should have been ( )/ to give the correct output as logical errors are also called semantic errors as they occur when the meaning of the program (its semanticsis not correct runtime error runtime error causes abnormal termination of program while it is executing runtime error is when the statement is correct syntacticallybut the interpreter cannot execute it runtime errors do not appear until after the program starts running or executing for examplewe have statement having division operation in the program by mistakeif the denominator entered is zero then it will give runtime error like "division by zerolet us look at the program - showing two types of runtime errors when user enters non-integer value -