eight errors and exceptions until now error messages haven' been more than mentionedbut if you have tried out the examples you have probably seen some there are (at leasttwo distinguishable kinds of errorssyntax errors and exceptions syntax errors syntax errorsalso known as parsing errorsare perhaps the most common kind of complaint you get while you are still learning pythonwhile true print('hello world'file ""line while true print('hello world'syntaxerrorinvalid syntax the parser repeats the offending line and displays little 'arrowpointing at the earliest point in the line where the error was detected the error is caused by (or at least detected atthe token preceding the arrowin the examplethe error is detected at the function print()since colon (':'is missing before it file name and line number are printed so you know where to look in case the input came from script exceptions even if statement or expression is syntactically correctit may cause an error when an attempt is made to execute it errors detected during execution are called exceptions and are not unconditionally fatalyou will soon learn how to handle them in python programs most exceptions are not handled by programshoweverand result in error messages as shown here ( / traceback (most recent call last)file ""line in zerodivisionerrordivision by zero spam* traceback (most recent call last)file ""line in nameerrorname 'spamis not defined ' traceback (most recent call last)file ""line in typeerrorcan' convert 'intobject to str implicitly