+ 1
Hi guys, can you tell me what is wrong in my code? It's telling me that there's no output.
x = 0 while x<=10: if(x%2==0): print(x) x=+1
1 Antwort
+ 4
the problem is that you have written x=+1 which is wrong the correct one should be - x+=1 and the second problem is the wrong indentation it should be like this -
x = 0
while x<=10:
if(x%2==0):
print(x)
x+=1