syntaxerrorinvalid tokenneither of which is very informative on the other handthe message does tell you where in the program the problem occurred actuallyit tells you where python noticed problemwhich is not necessarily where the error is sometimes the error is prior to the location of the error messageoften on the preceding line runtime errors runtime errors are produced by the interpreter if something goes wrong while the program is running most runtime error messages include information about where the error occurred and what functions were executed examplean infinite recursion eventually causes the runtime error "maximum recursion depth exceeded semantic errors semantic errors are problems with program that runs without producing error messages but does not do the right thing examplean expression may not be evaluated in the order you expectyielding an incorrect result in some wayssemantic errors are the hardest to debugbecause the interpreter provides no information about what is wrong only you know what the program is supposed to do the first step is to make connection between the program text and the behavior you are seeing you need guess about what the program is actually doing for example num num num averagenum +num +num / print ('the average of the three numbers is:',averageoutputthe average of the three numbers is but the output of the actual calculation should bethe average of the three numbers is thereforethe output of the program stated above is incorrect because of the order of operations in arithmetic in order to rectify this problemthe following parenthesis should be addedaverage(num +num +num )/ page