What is the difference between Name error,Type error and Syntax error ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the difference between Name error,Type error and Syntax error ?

Whenever we make mistakes in coding and try to excecute the program it shows one of those errors mentioned above .Discuss the major differences between them.

21st May 2020, 4:15 AM
Ashwini Burnwal
Ashwini Burnwal - avatar
3 Answers
+ 1
Is this python?
21st May 2020, 4:22 AM
James Clark I. Vinarao
James Clark I. Vinarao - avatar
+ 3
Remember Name error and Type error are exceptions that can be caught by using try: / except: You can't do that with Syntax error because it prevents the code from running at all, including the try: statement.
21st May 2020, 4:39 AM
David Ashton
David Ashton - avatar
+ 1
Well if this is python look at this article. https://www.tutorialsteacher.com/python/error-types-in-python Summary is at its table.
21st May 2020, 4:26 AM
James Clark I. Vinarao
James Clark I. Vinarao - avatar