+ 1
whats wrong in it? why python is not showing uo value of y?
x=5 x+y=0 print(y)
2 odpowiedzi
+ 3
1) because you didn't initialize it before, you must create variable before printing it or make another operations with it
2) you can't write expressions like equations in math:
x+y=0 is not correct and python will not calculate y depending on other numbers. you get an error trying to do such things.
you have to write statements more clearly, like for this case:
y = 0 - x
or just
y = -x
thing you need to find/calculate is always alone and left to the '=' sign
0
thanks