Python Nameerror

Python Nameerror

                                                Python Name Error
Python NameError is the most common error which occurs in Python even for an Advanced Programmer. It is basic error which can be easily identifies and solved. It means that there is no variable with that name which we are trying to use. 

This error occurs for many reasons:
 1)When we type the variable name wrong. When we declare/initialize the variable with one name and we try to use that variable with different name or with wrong name due to typing mistake.
2)When we forget to initialize the variable name and try to use to use that variable name.
3)When we use the same variable name but with wrong case sensitive.
4)Calling the function before it is declared.
5)Declaring the variable out of scope.

Below we can find the output screen shots of NameError with various reasons mentioned above:

This error can be easily solved just by giving correct variable names or declaring the variable first,etc.