Closed muhammad-fiaz closed 7 months ago
Thank you for creating this issue!
# This code will raise an error because x is not defined
x = 10
y = x + 2
The error message will be:
NameError: name 'x' is not defined
To fix this error, you need to define x
before using it. You can do this by adding the following line to the beginning of your code:
x = 10
Once you have defined x
, you will be able to use it in your code without getting an error.
python error