muhammad-fiaz / test-repository

Hey There! This repository is just a testing purposes repo for some of my projects don't mind this!
0 stars 0 forks source link

python error #14

Closed muhammad-fiaz closed 7 months ago

muhammad-fiaz commented 7 months ago

python error

next-mage[bot] commented 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.