+ 1
Quotient
Hey guys, I crave an answer to my question. The question is: Why does this code says "invalid syntax": x=0 while x<=10: if x%2=0: print(x) x+=1 And this one works all fine: x=0 while x<=10: if x%2<=0: print(x) x+=1
2 ответов
+ 2
because the error is in the if statement
it shoud have == instead of =
0
Thx very much, I got so puzzled by that, I feel stupid now haha